@@ -24,6 +24,8 @@ substitutions:
24
24
# for the "hardcoded" word in the below steps.
25
25
_CLUSTER_NAME : smoke-test
26
26
_CLUSTER_LOCATION : europe-west2-b
27
+ _APP_VERSION : " 0.1.0-build"
28
+ _APP_MINOR_VERSION : " 0.1"
27
29
steps :
28
30
- id : build-smoke-test
29
31
name : gcr.io/cloud-builders/docker
@@ -32,15 +34,15 @@ steps:
32
34
- -f
33
35
- " smoke-test.Dockerfile"
34
36
- --tag
35
- - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:build-$BUILD_ID
37
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:${_APP_VERSION}
36
38
- " ."
37
39
waitFor : ["-"]
38
40
39
41
- id : push-smoke-test
40
42
name : gcr.io/cloud-builders/docker
41
43
args :
42
44
- push
43
- - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:build-$BUILD_ID
45
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:${_APP_VERSION}
44
46
waitFor :
45
47
- build-smoke-test
46
48
56
58
- -exc
57
59
- |
58
60
cat data-test/schema.yaml \
59
- | IMAGE=gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:build-$BUILD_ID envsubst \
61
+ | IMAGE=gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:build-${nvsubst \
60
62
| tee /dev/stderr > /tmp/schema.yaml && mv /tmp/schema.yaml data-test/schema.yaml
61
63
waitFor :
62
64
- " -"
@@ -66,20 +68,38 @@ steps:
66
68
args :
67
69
- build
68
70
- --tag
69
- - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:build-$BUILD_ID
71
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_VERSION}
70
72
- " ."
71
73
waitFor : ["set-data-test-schema-default-values"]
72
74
75
+ - id : retag-deployer
76
+ name : gcr.io/cloud-builders/docker
77
+ args :
78
+ - tag
79
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_VERSION}
80
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_MINOR_VERSION}
81
+ waitFor : ["set-data-test-schema-default-values"]
82
+
73
83
- id : push-deployer
74
84
name : gcr.io/cloud-builders/docker
75
85
args :
76
86
- push
77
- - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:build-$BUILD_ID
87
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_VERSION}
78
88
waitFor :
79
89
- build-deployer
80
90
81
- # The tag deployer:1.1 (for example) is the actual "important" image
82
- # since it is the one that will be used in the Marketplace UI.
91
+ # Althouth the application version is, for example, "1.1.0-gcm.1", we
92
+ # still push a "minor version" tag "1.1". This "minor version" tag is the
93
+ # actual important image since it is the one that will be used in the
94
+ # Marketplace UI.
95
+ - id : push-retagged-deployer
96
+ name : gcr.io/cloud-builders/docker
97
+ args :
98
+ - push
99
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_VERSION}
100
+ waitFor :
101
+ - retag-deployer
102
+
83
103
#
84
104
# We do not retag and push the deployer:1.1 as part of this cloudbuild
85
105
# since this cloudbuild is meant for building the
@@ -196,7 +216,7 @@ steps:
196
216
- ./mpdev
197
217
- verify
198
218
- --wait_timeout=99999999
199
- - --deployer=gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:build-$BUILD_ID
219
+ - --deployer=gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_VERSION}
200
220
waitFor :
201
221
- check-cloud-marketplace-tools
202
222
- push-deployer
@@ -212,10 +232,11 @@ steps:
212
232
- ./mpdev
213
233
- publish
214
234
- --gcs_repo=gs://$PROJECT_ID
215
- - --deployer_image=gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:build-$BUILD_ID
235
+ - --deployer_image=gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_VERSION}
216
236
waitFor :
217
237
- verify
218
238
219
239
images :
220
- - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:build-$BUILD_ID
221
- - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:build-$BUILD_ID
240
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_VERSION}
241
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/deployer:${_APP_MINOR_VERSION}
242
+ - gcr.io/$PROJECT_ID/jetstack-secure-for-cert-manager/smoke-test:${_APP_VERSION}
0 commit comments