13
13
# limitations under the License.
14
14
15
15
ARCH ?= amd64
16
- ALL_ARCH = amd64 arm arm64 ppc64le s390x
16
+ ARCH_LIST ?= amd64 arm arm64 ppc64le s390x
17
+ RELEASE_ARCH_LIST = amd64
17
18
# The output type could either be docker (local), or registry.
18
19
OUTPUT_TYPE ?= docker
19
20
@@ -234,10 +235,10 @@ docker-push/http-test-server: docker-build/http-test-server
234
235
# As `docker buildx` is time and resource consuming, if not necessary, building specific arch images,
235
236
# like `make docker-build-arch-aamd64`, is recommended.
236
237
.PHONY : docker-build-all
237
- docker-build-all : $(addprefix docker-build-arch-,$(ALL_ARCH ) )
238
+ docker-build-all : $(addprefix docker-build-arch-,$(ARCH_LIST ) )
238
239
239
240
.PHONY : docker-push-all
240
- docker-push-all : $(addprefix docker-push/proxy-agent-,$(ALL_ARCH ) ) $(addprefix docker-push/proxy-server-,$(ALL_ARCH ) ) $(addprefix docker-push/proxy-test-client-,$(ALL_ARCH ) ) $(addprefix docker-push/http-test-server-,$(ALL_ARCH ) )
241
+ docker-push-all : $(addprefix docker-push/proxy-agent-,$(ARCH_LIST ) ) $(addprefix docker-push/proxy-server-,$(ARCH_LIST ) ) $(addprefix docker-push/proxy-test-client-,$(ARCH_LIST ) ) $(addprefix docker-push/http-test-server-,$(ARCH_LIST ) )
241
242
$(MAKE ) docker-push-manifest/proxy-agent
242
243
$(MAKE ) docker-push-manifest/proxy-server
243
244
$(MAKE ) docker-push-manifest/proxy-test-client
@@ -277,29 +278,29 @@ docker-push/http-test-server-%:
277
278
.PHONY : docker-push-manifest/proxy-agent
278
279
docker-push-manifest/proxy-agent : # # Push the fat manifest docker image.
279
280
# # Minimum docker version 18.06.0 is required for creating and pushing manifest images.
280
- ${DOCKER_CMD} manifest create --amend $(AGENT_FULL_IMAGE ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(AGENT_FULL_IMAGE ) \-&:$(TAG ) ~g")
281
- @for arch in $(ALL_ARCH ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${AGENT_FULL_IMAGE} :${TAG} ${AGENT_FULL_IMAGE} -$$ {arch}:${TAG} ; done
281
+ ${DOCKER_CMD} manifest create --amend $(AGENT_FULL_IMAGE ) :$(TAG ) $(shell echo $(ARCH_LIST ) | sed -e "s~[^ ]* ~$(AGENT_FULL_IMAGE ) \-&:$(TAG ) ~g")
282
+ @for arch in $(ARCH_LIST ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${AGENT_FULL_IMAGE} :${TAG} ${AGENT_FULL_IMAGE} -$$ {arch}:${TAG} ; done
282
283
${DOCKER_CMD} manifest push --purge $(AGENT_FULL_IMAGE ) :$(TAG )
283
284
284
285
.PHONY : docker-push-manifest/proxy-server
285
286
docker-push-manifest/proxy-server : # # Push the fat manifest docker image.
286
287
# # Minimum docker version 18.06.0 is required for creating and pushing manifest images.
287
- ${DOCKER_CMD} manifest create --amend $(SERVER_FULL_IMAGE ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(SERVER_FULL_IMAGE ) \-&:$(TAG ) ~g")
288
- @for arch in $(ALL_ARCH ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${SERVER_FULL_IMAGE} :${TAG} ${SERVER_FULL_IMAGE} -$$ {arch}:${TAG} ; done
288
+ ${DOCKER_CMD} manifest create --amend $(SERVER_FULL_IMAGE ) :$(TAG ) $(shell echo $(ARCH_LIST ) | sed -e "s~[^ ]* ~$(SERVER_FULL_IMAGE ) \-&:$(TAG ) ~g")
289
+ @for arch in $(ARCH_LIST ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${SERVER_FULL_IMAGE} :${TAG} ${SERVER_FULL_IMAGE} -$$ {arch}:${TAG} ; done
289
290
${DOCKER_CMD} manifest push --purge $(SERVER_FULL_IMAGE ) :$(TAG )
290
291
291
292
.PHONY : docker-push-manifest/proxy-test-client
292
293
docker-push-manifest/proxy-test-client : # # Push the fat manifest docker image.
293
294
# # Minimum docker version 18.06.0 is required for creating and pushing manifest images.
294
- ${DOCKER_CMD} manifest create --amend $(TEST_CLIENT_FULL_IMAGE ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(TEST_CLIENT_FULL_IMAGE ) \-&:$(TAG ) ~g")
295
- @for arch in $(ALL_ARCH ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${TEST_CLIENT_FULL_IMAGE} :${TAG} ${TEST_CLIENT_FULL_IMAGE} -$$ {arch}:${TAG} ; done
295
+ ${DOCKER_CMD} manifest create --amend $(TEST_CLIENT_FULL_IMAGE ) :$(TAG ) $(shell echo $(ARCH ) | sed -e "s~[^ ]* ~$(TEST_CLIENT_FULL_IMAGE ) \-&:$(TAG ) ~g")
296
+ @for arch in $(ARCH_LIST ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${TEST_CLIENT_FULL_IMAGE} :${TAG} ${TEST_CLIENT_FULL_IMAGE} -$$ {arch}:${TAG} ; done
296
297
${DOCKER_CMD} manifest push --purge $(TEST_CLIENT_FULL_IMAGE ) :$(TAG )
297
298
298
299
.PHONY : docker-push-manifest/http-test-server
299
300
docker-push-manifest/http-test-server : # # Push the fat manifest docker image.
300
301
# # Minimum docker version 18.06.0 is required for creating and pushing manifest images.
301
- ${DOCKER_CMD} manifest create --amend $(TEST_SERVER_FULL_IMAGE ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(TEST_SERVER_FULL_IMAGE ) \-&:$(TAG ) ~g")
302
- @for arch in $(ALL_ARCH ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${TEST_SERVER_FULL_IMAGE} :${TAG} ${TEST_SERVER_FULL_IMAGE} -$$ {arch}:${TAG} ; done
302
+ ${DOCKER_CMD} manifest create --amend $(TEST_SERVER_FULL_IMAGE ) :$(TAG ) $(shell echo $(ARCH_LIST ) | sed -e "s~[^ ]* ~$(TEST_SERVER_FULL_IMAGE ) \-&:$(TAG ) ~g")
303
+ @for arch in $(ARCH_LIST ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${TEST_SERVER_FULL_IMAGE} :${TAG} ${TEST_SERVER_FULL_IMAGE} -$$ {arch}:${TAG} ; done
303
304
${DOCKER_CMD} manifest push --purge $(TEST_SERVER_FULL_IMAGE ) :$(TAG )
304
305
305
306
# # --------------------------------------
@@ -308,7 +309,7 @@ docker-push-manifest/http-test-server: ## Push the fat manifest docker image.
308
309
309
310
.PHONY : release-staging
310
311
release-staging : # # Builds and push container images to the staging bucket.
311
- REGISTRY=$(STAGING_REGISTRY ) $(MAKE ) docker-push-all release-alias-tag
312
+ REGISTRY=$(STAGING_REGISTRY ) ARCH_LIST= " $( RELEASE_ARCH_LIST ) " $(MAKE ) docker-push-all release-alias-tag
312
313
313
314
.PHONY : release-alias-tag
314
315
release-alias-tag : # Adds the tag to the last build tag. BASE_REF comes from the cloudbuild.yaml
0 commit comments