From 95c070855e467d9d424b3a3196d6b29f6c7c9a1c Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Tue, 26 Nov 2019 18:15:24 -0500 Subject: [PATCH] Fix TAG_NAME interpolation --- cloudbuild.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index fd4e718..64f1943 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -36,7 +36,8 @@ steps: args: - -c - | - REF="${TAG_NAME//v}" + TAG="${TAG_NAME}" + REF="${TAG//v}" [[ -z "$${REF}" && "${BRANCH_NAME}" == "master" ]] && REF="latest" [[ -z "$${REF}" ]] && echo "not a tag or master branch" && exit 0 gsutil cp build/*.tgz gs://oauth2l/$${REF}/ @@ -48,7 +49,8 @@ steps: args: - -c - | - REF="${TAG_NAME//v}" + TAG="${TAG_NAME}" + REF="${TAG//v}" [[ -z "$${REF}" && "${BRANCH_NAME}" == "master" ]] && REF="latest" [[ -z "$${REF}" ]] && echo "not a tag or master branch" && exit 0 docker build -t gcr.io/${PROJECT_ID}/oauth2l:$${REF} . && \