Skip to content

Commit d3cdeba

Browse files
committed
Clean up cloudbuild
Don't specify the IMAGE_EXTRA_TAG_NAMES when we're building release (git tag) images.
1 parent 86e7497 commit d3cdeba

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

cloudbuild.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ steps:
55
env:
66
- IMAGE_REGISTRY=gcr.io/$PROJECT_ID
77
- _GIT_TAG=$_GIT_TAG
8-
- IMAGE_EXTRA_TAG_NAMES=$_PULL_BASE_REF
98
- HOME=/root
109
substitutions:
1110
_GIT_TAG: '0.0.0'

scripts/test-infra/push-image.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
# Override VERSION if _GIT_TAG is specified. Strip 10 first characters
44
# ('vYYYYMMDD-') from _GIT_TAG in order to get a reproducible version and
55
# container image tag
6-
VERSION_OVERRIDE=${_GIT_TAG+VERSION=${_GIT_TAG:10}}
6+
if [ -z "$_GIT_TAG" ]; then
7+
MAKE_VARS="IMAGE_EXTRA_TAG_NAMES=${_PULL_BASE_REF}"
8+
else
9+
MAKE_VARS="VERSION=${_GIT_TAG:10}"
10+
fi
711

812
# Authenticate in order to be able to push images
913
gcloud auth configure-docker
1014

1115
# Build and push images
12-
IMAGE_ALL_PLATFORMS=linux/amd64,linux/arm64 make push-all $VERSION_OVERRIDE
16+
IMAGE_ALL_PLATFORMS=linux/amd64,linux/arm64 make push-all $MAKE_VARS
1317

1418
go install helm.sh/helm/v3/cmd/[email protected]
1519

16-
make helm-push $VERSION_OVERRIDE
20+
make helm-push $VERSION_OVERRIDE $MAKE_VARS

0 commit comments

Comments
 (0)