diff options
| author | Abhi <[email protected]> | 2025-07-14 00:19:58 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-14 04:19:58 +0000 |
| commit | 8d0a4082a44403a7ed3f5d920b7b420a2cf72237 (patch) | |
| tree | 4ecdb6a1a58d316e27fa9a6b64c8e5871048af0c /.gcp | |
| parent | ef8ec984894408953cc6e0ea2e46cfeb9c272507 (diff) | |
Fix(ci): Correct container publishing pipeline and improve robustness (#4093)
Diffstat (limited to '.gcp')
| -rw-r--r-- | .gcp/release-docker.yaml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/.gcp/release-docker.yaml b/.gcp/release-docker.yaml index 1a8ad6b5..a3bd7e70 100644 --- a/.gcp/release-docker.yaml +++ b/.gcp/release-docker.yaml @@ -24,13 +24,15 @@ steps: args: - -c - | + SHELL_TAG_NAME="$TAG_NAME" FINAL_TAG="$SHORT_SHA" # Default to SHA - if [[ "$TAG_NAME" == *"-nightly"* ]]; then + if [[ "$$SHELL_TAG_NAME" == *"-nightly"* ]]; then echo "Nightly release detected." - FINAL_TAG="${TAG_NAME#v}" - elif [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + FINAL_TAG="$${SHELL_TAG_NAME#v}" + # Also escape the variable in the regex match + elif [[ "$$SHELL_TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Official release detected." - FINAL_TAG="${TAG_NAME#v}" + FINAL_TAG="$${SHELL_TAG_NAME#v}" else echo "Development/RC release detected. Using commit SHA as tag." fi @@ -58,10 +60,7 @@ steps: - -c - | set -e - IMAGE_TAG=$$(cat /workspace/image_tag.txt) - BASE_IMAGE_URI=$$(npm run -s config get sandboxImageUri) - IMAGE_URI_NO_TAG=$${BASE_IMAGE_URI%:*} - FINAL_IMAGE_URI="$${IMAGE_URI_NO_TAG}:$${IMAGE_TAG}" + FINAL_IMAGE_URI=$$(cat /workspace/final_image_uri.txt) echo "Pushing sandbox image: $${FINAL_IMAGE_URI}" $_CONTAINER_TOOL push "$${FINAL_IMAGE_URI}" |
