Skip to content

Commit ad3f4d8

Browse files
authored
Merge pull request #2303 from marquiz/devel/test-infra-fix
scripts/test-infra/push-image: fix env variable parsing
2 parents bedbb73 + dcf5316 commit ad3f4d8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/test-infra/push-image.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
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-
if [ -z "$_GIT_TAG" ]; then
7-
MAKE_VARS="IMAGE_EXTRA_TAG_NAMES=${_PULL_BASE_REF} CHART_EXTRA_VERSIONS=0.0.0-${_PULL_BASE_REF}"
8-
else
6+
if [ -n "$_GIT_TAG" ]; then
97
MAKE_VARS="VERSION=${_GIT_TAG:10}"
108
fi
9+
if ! [[ $_PULL_BASE_REF =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
10+
MAKE_VARS="$MAKE_VARS IMAGE_EXTRA_TAG_NAMES=${_PULL_BASE_REF} CHART_EXTRA_VERSIONS=0.0.0-${_PULL_BASE_REF}"
11+
fi
1112

1213
# Authenticate in order to be able to push images
1314
gcloud auth configure-docker

0 commit comments

Comments
 (0)