@@ -20,8 +20,7 @@ ARCH ?= amd64
20
20
BUILDARCH ?= amd64
21
21
# TARGETARCH specifies the golang target platform, for docker build targets.
22
22
TARGETARCH ?= $(ARCH )
23
- ARCH_LIST ?= amd64 arm arm64 ppc64le s390x
24
- RELEASE_ARCH_LIST = amd64 arm64
23
+ ALL_ARCH ?= amd64 arm arm64 ppc64le s390x
25
24
# The output type could either be docker (local), or registry.
26
25
OUTPUT_TYPE ?= docker
27
26
GO_TOOLCHAIN ?= golang
@@ -256,10 +255,10 @@ docker-push/http-test-server: docker-build/http-test-server
256
255
# As `docker buildx` is time and resource consuming, if not necessary, building specific arch images,
257
256
# like `make docker-build-arch-amd64`, is recommended.
258
257
.PHONY : docker-build-all
259
- docker-build-all : $(addprefix docker-build-arch-,$(ARCH_LIST ) )
258
+ docker-build-all : $(addprefix docker-build-arch-,$(ALL_ARCH ) )
260
259
261
260
.PHONY : docker-push-all
262
- docker-push-all : $(addprefix docker-push/proxy-agent-,$(ARCH_LIST ) ) $(addprefix docker-push/proxy-server-,$(ARCH_LIST ) )
261
+ docker-push-all : $(addprefix docker-push/proxy-agent-,$(ALL_ARCH ) ) $(addprefix docker-push/proxy-server-,$(ALL_ARCH ) )
263
262
$(MAKE ) docker-push-manifest/proxy-agent
264
263
$(MAKE ) docker-push-manifest/proxy-server
265
264
@@ -282,15 +281,15 @@ docker-push/proxy-server-%:
282
281
.PHONY : docker-push-manifest/proxy-agent
283
282
docker-push-manifest/proxy-agent : # # Push the fat manifest docker image.
284
283
# # Minimum docker version 18.06.0 is required for creating and pushing manifest images.
285
- ${DOCKER_CMD} manifest create --amend $(AGENT_FULL_IMAGE ) :$(TAG ) $(shell echo $(ARCH_LIST ) | sed -e "s~[^ ]* ~$(AGENT_FULL_IMAGE ) \-&:$(TAG ) ~g")
286
- @for arch in $(ARCH_LIST ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${AGENT_FULL_IMAGE} :${TAG} ${AGENT_FULL_IMAGE} -$$ {arch}:${TAG} ; done
284
+ ${DOCKER_CMD} manifest create --amend $(AGENT_FULL_IMAGE ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(AGENT_FULL_IMAGE ) \-&:$(TAG ) ~g")
285
+ @for arch in $(ALL_ARCH ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${AGENT_FULL_IMAGE} :${TAG} ${AGENT_FULL_IMAGE} -$$ {arch}:${TAG} ; done
287
286
${DOCKER_CMD} manifest push --purge $(AGENT_FULL_IMAGE ) :$(TAG )
288
287
289
288
.PHONY : docker-push-manifest/proxy-server
290
289
docker-push-manifest/proxy-server : # # Push the fat manifest docker image.
291
290
# # Minimum docker version 18.06.0 is required for creating and pushing manifest images.
292
- ${DOCKER_CMD} manifest create --amend $(SERVER_FULL_IMAGE ) :$(TAG ) $(shell echo $(ARCH_LIST ) | sed -e "s~[^ ]* ~$(SERVER_FULL_IMAGE ) \-&:$(TAG ) ~g")
293
- @for arch in $(ARCH_LIST ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${SERVER_FULL_IMAGE} :${TAG} ${SERVER_FULL_IMAGE} -$$ {arch}:${TAG} ; done
291
+ ${DOCKER_CMD} manifest create --amend $(SERVER_FULL_IMAGE ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(SERVER_FULL_IMAGE ) \-&:$(TAG ) ~g")
292
+ @for arch in $(ALL_ARCH ) ; do ${DOCKER_CMD} manifest annotate --arch $$ {arch} ${SERVER_FULL_IMAGE} :${TAG} ${SERVER_FULL_IMAGE} -$$ {arch}:${TAG} ; done
294
293
${DOCKER_CMD} manifest push --purge $(SERVER_FULL_IMAGE ) :$(TAG )
295
294
296
295
# # --------------------------------------
@@ -299,7 +298,7 @@ docker-push-manifest/proxy-server: ## Push the fat manifest docker image.
299
298
300
299
.PHONY : release-staging
301
300
release-staging : # # Builds and push container images to the staging bucket.
302
- REGISTRY=$(STAGING_REGISTRY ) ARCH_LIST= " $( RELEASE_ARCH_LIST ) " $(MAKE ) docker-push-all release-alias-tag
301
+ REGISTRY=$(STAGING_REGISTRY ) $(MAKE ) docker-push-all release-alias-tag
303
302
304
303
.PHONY : release-alias-tag
305
304
release-alias-tag : # Adds the tag to the last build tag. BASE_REF comes from the cloudbuild.yaml
0 commit comments