1
0
mirror of https://github.com/google/nomulus synced 2026-05-30 19:46:34 +00:00

Add postdeploy task in CD pipeline to tag deployed image (#3063)

* add variable for pipeline and region

* remove new lines from script

* add postdeploy task to tag images
This commit is contained in:
Juan Celhay
2026-05-27 12:24:38 -04:00
committed by GitHub
parent c1ce73db49
commit ba91141505
2 changed files with 16 additions and 1 deletions

View File

@@ -202,7 +202,8 @@ steps:
--project=${PROJECT_ID} \
--images="nomulus=gcr.io/${PROJECT_ID}/nomulus@${nomulus_digest}" \
--source=. \
--skaffold-file=release/clouddeploy/skaffold.yaml
--skaffold-file=release/clouddeploy/skaffold.yaml \
--deploy-parameters="deployed_image=gcr.io/${PROJECT_ID}/nomulus@${nomulus_digest},base_image=us-docker.pkg.dev/${PROJECT_ID}/gcr.io/nomulus"
# The tarballs and jars to upload to GCS.
artifacts:
objects:

View File

@@ -32,6 +32,20 @@ serialPipeline:
- phaseId: "stable"
profiles: ["crash"]
percentage: 100
postdeploy:
tasks:
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
DEPLOYED_IMAGE: ${{ deploy_params['deployed_image'] }}
BASE_IMAGE: ${{ deploy_params['base_image'] }}
TARGET_ID: ${{ target.id }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud artifacts docker tags add $DEPLOYED_IMAGE \
${BASE_IMAGE}:live-cd-${TARGET_ID}
analysis:
# 10 minutes.
duration: 600s