-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
71 lines (57 loc) · 2 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
MARKETPLACE_TOOLS_TAG = $(shell cat MARKETPLACE_TOOLS_TAG)
include app.Makefile
include crd.Makefile
include var.Makefile
include gcloud.Makefile
TAG ?= v1.5.2
$(info ---- TAG = $(TAG))
APP_DEPLOYER_IMAGE ?= $(REGISTRY)/eosio-testnet/deployer:$(TAG)
NAME ?= eosio-testnet-1
APP_PARAMETERS ?= { \
"name": "$(NAME)", \
"namespace": "$(NAMESPACE)", \
"imageEos": "$(REGISTRY)/eos:${TAG}" \
}
APP_TEST_PARAMETERS ?= { \
}
# override name_parameter and namespace_parameter so that
# app/uninstall rule can be executed.
override define name_parameter
$(shell echo '$(NAME)')
endef
override define namespace_parameter
$(shell echo '$(NAMESPACE)')
endef
app/build:: .build/eosio-testnet/deployer
.build/eosio-testnet: | .build
mkdir -p "$@"
.build/eosio-testnet/deployer: Dockerfile \
chart/eosio-testnet-mp/* \
chart/eosio-testnet-mp/charts/eosio-testnet/* \
chart/eosio-testnet-mp/charts/eosio-testnet/templates/* \
chart/eosio-testnet-mp/templates/* \
schema.yaml \
.build/var/APP_DEPLOYER_IMAGE \
.build/var/REGISTRY \
.build/var/TAG \
.build/eosio-testnet/eos \
| .build/eosio-testnet
docker build \
--build-arg REGISTRY="$(REGISTRY)/eos" \
--build-arg TAG="$(TAG)" \
--tag "$(APP_DEPLOYER_IMAGE)" \
-f Dockerfile \
.
docker push "$(APP_DEPLOYER_IMAGE)"
@touch "$@"
# Simulate building of primary app image. Actually just copying public image to
# local registry.
.build/eosio-testnet/eos: .build/var/REGISTRY \
.build/var/TAG \
| .build/eosio-testnet
if [ $(REGISTRY) != "gcr.io/oci-grandeos" ]; then \
docker pull huangminghuang/eos:${TAG}; \
docker tag huangminghuang/eos:${TAG} "$(REGISTRY)/eos:$(TAG)"; \
docker push "$(REGISTRY)/eos:$(TAG)"; \
fi;
@touch "$@"