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:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user