-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
135 lines (110 loc) · 4.66 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
include ./app.Makefile
include ./crd.Makefile
include ./gcloud.Makefile
include ./var.Makefile
TAG ?= 1.26.7
GCP_TAG ?= 1.26
CPX_TAG ?= 13.0-88.14
EXPORTER_TAG ?= 1.4.9
$(info ---- TAG = $(TAG))
APP_DEPLOYER_IMAGE ?= $(REGISTRY)/citrix-adc-cpx/deployer:$(TAG)
NAME ?= citrix-adc-cpx-with-cic
ifdef IMAGE_CITRIX_CPX
IMAGE_CITRIX_CPX_FIELD = , "image": "$(IMAGE_CITRIX_CPX)" endif
endif
ifdef IMAGE_CITRIX_CONTROLLER
IMAGE_CITRIX_CONTROLLER_FIELD = , "cic.image": "$(IMAGE_CITRIX_CONTROLLER)" endif
endif
ifdef IMAGE_EXPORTER
IMAGE_EXPORTER_FIELD = , "exporter.image": "$(IMAGE_EXPORTER)" endif
endif
ifdef CITRIX_SERVICE_ACCOUNT
CITRIX_SERVICE_ACCOUNT = , "serviceAccount": "$(CITRIX_SERVICE_ACCOUNT)"
endif
APP_PARAMETERS ?= { \
"name": "$(NAME)", \
"namespace": "$(NAMESPACE)" \
$(IMAGE_CITRIX_CONTROLLER_FIELD) \
$(IMAGE_CITRIX_CPX_FIELD) \
$(IMAGE_EXPORTER_FIELD) \
$(CITRIX_SERVICE_ACCOUNT) \
}
TESTER_IMAGE ?= $(REGISTRY)/citrix-adc-cpx/tester:$(TAG)
app/build:: .build/citrix-adc-cpx/debian9 \
.build/citrix-adc-cpx/deployer \
.build/citrix-adc-cpx/citrix-adc-cpx \
.build/citrix-adc-cpx/citrix-k8s-ingress-controller \
.build/citrix-adc-cpx/exporter \
.build/citrix-adc-cpx/tester
.build/citrix-adc-cpx: | .build
mkdir -p "$@"
.build/citrix-adc-cpx/debian9: .build/var/REGISTRY \
.build/var/TAG \
| .build/citrix-adc-cpx
docker pull marketplace.gcr.io/google/debian9
docker tag marketplace.gcr.io/google/debian9 "$(REGISTRY)/citrix-adc-cpx/debian9:$(TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx/debian9:$(TAG)"
@touch "$@"
.build/citrix-adc-cpx/deployer: deployer/* \
chart/citrix-cpx-with-ingress-controller/* \
chart/citrix-cpx-with-ingress-controller/templates/* \
schema.yaml \
.build/var/APP_DEPLOYER_IMAGE \
.build/var/MARKETPLACE_TOOLS_TAG \
.build/var/REGISTRY \
.build/var/TAG \
| .build/citrix-adc-cpx
docker build \
--build-arg REGISTRY="$(REGISTRY)/citrix-adc-cpx" \
--build-arg TAG="$(TAG)" \
--build-arg MARKETPLACE_TOOLS_TAG="$(MARKETPLACE_TOOLS_TAG)" \
--tag "$(APP_DEPLOYER_IMAGE)" \
-f deployer/Dockerfile \
.
docker push "$(APP_DEPLOYER_IMAGE)"
docker pull "$(APP_DEPLOYER_IMAGE)"
docker tag "$(APP_DEPLOYER_IMAGE)" \
"$(REGISTRY)/citrix-adc-cpx/deployer:$(GCP_TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx/deployer:$(GCP_TAG)"
@touch "$@"
.build/citrix-adc-cpx/citrix-adc-cpx: .build/var/REGISTRY \
.build/var/TAG \
| .build/citrix-adc-cpx
docker pull quay.io/citrix/citrix-k8s-cpx-ingress:$(CPX_TAG)
docker tag quay.io/citrix/citrix-k8s-cpx-ingress:$(CPX_TAG) \
"$(REGISTRY)/citrix-adc-cpx:$(TAG)"
docker tag quay.io/citrix/citrix-k8s-cpx-ingress:$(CPX_TAG) \
"$(REGISTRY)/citrix-adc-cpx:$(GCP_TAG)"
docker tag quay.io/citrix/citrix-k8s-cpx-ingress:$(CPX_TAG) \
"$(REGISTRY)/citrix-adc-cpx:$(CPX_TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx:$(TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx:$(GCP_TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx:$(CPX_TAG)"
@touch "$@"
.build/citrix-adc-cpx/citrix-k8s-ingress-controller: .build/var/REGISTRY \
.build/var/TAG \
| .build/citrix-adc-cpx
docker pull quay.io/citrix/citrix-k8s-ingress-controller:$(TAG)
docker tag quay.io/citrix/citrix-k8s-ingress-controller:$(TAG) \
"$(REGISTRY)/citrix-adc-cpx/citrix-k8s-ingress-controller:$(TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx/citrix-k8s-ingress-controller:$(TAG)"
@touch "$@"
.build/citrix-adc-cpx/exporter: .build/var/REGISTRY \
.build/var/TAG \
| .build/citrix-adc-cpx
docker pull quay.io/citrix/citrix-adc-metrics-exporter:$(EXPORTER_TAG)
docker tag quay.io/citrix/citrix-adc-metrics-exporter:$(EXPORTER_TAG) \
"$(REGISTRY)/citrix-adc-cpx/citrix-adc-metrics-exporter:$(TAG)"
docker tag quay.io/citrix/citrix-adc-metrics-exporter:$(EXPORTER_TAG) \
"$(REGISTRY)/citrix-adc-cpx/citrix-adc-metrics-exporter:$(EXPORTER_TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx/citrix-adc-metrics-exporter:$(TAG)"
docker push "$(REGISTRY)/citrix-adc-cpx/citrix-adc-metrics-exporter:$(EXPORTER_TAG)"
@touch "$@"
.build/citrix-adc-cpx/tester: .build/var/TESTER_IMAGE \
$(shell find apptest -type f) \
| .build/citrix-adc-cpx
$(call print_target,$@)
cd apptest/tester \
&& docker build --tag "$(TESTER_IMAGE)" .
docker push "$(TESTER_IMAGE)"
@touch "$@"