Files
nomulus/release/clouddeploy/delivery-pipeline.yaml
T
Juan CelhayandGitHub b6397ae2e4 Increase Cloud Deploy analysis step durations plus other QoL changes (#3230)
- Adjusts SLA analysis soak durations to 30 minutes per phase for sandbox and 1 hour per phase for production.
- Updates non-prod automations to auto-advance through canary-1 and canary-5 in crash and sandbox.
- Adds an automation rule to auto-promote releases from crash to sandbox (still need to manually approve the sandbox release).
- Adds documentation in skaffold.yaml clarifying dual deployment.
2026-09-10 20:40:41 +00:00

294 lines
11 KiB
YAML

apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
name: deploy-nomulus
description: deploy-nomulus is a Cloud native replacement for Spinnaker that enables
gradual rollouts and SLA-based canary analysis for Nomulus.
serialPipeline:
stages:
- targetId: crash
strategy:
canary:
customCanaryDeployment:
phaseConfigs:
- phaseId: "canary-1"
profiles: ["crash-partial-phase-1"]
percentage: 10
analysis:
# 10 minutes.
duration: 600s
googleCloud:
alertPolicyChecks:
crashPartialDeploymentAlertPolicyChecks
- phaseId: "canary-5"
profiles: ["crash-partial-phase-5"]
percentage: 50
analysis:
# 10 minutes.
duration: 600s
googleCloud:
alertPolicyChecks:
crashPartialDeploymentAlertPolicyChecks
- 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 container images add-tag $DEPLOYED_IMAGE \
${BASE_IMAGE}:live-cd-${TARGET_ID} --quiet
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-schema-deploy-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-schema-deploy-${TARGET_ID}.yaml
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-deploy-gke-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-deploy-gke-${TARGET_ID}.yaml
analysis:
# 10 minutes.
duration: 600s
googleCloud:
alertPolicyChecks:
crashStableDeploymentAlertPolicyChecks
- targetId: sandbox
strategy:
canary:
customCanaryDeployment:
phaseConfigs:
- phaseId: "canary-1"
profiles: ["sandbox-partial-phase-1"]
percentage: 10
predeploy:
tasks:
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-schema-verify-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-schema-verify-${TARGET_ID}.yaml
analysis:
# 30 minutes.
duration: 1800s
googleCloud:
alertPolicyChecks:
sandboxPartialDeploymentAlertPolicyChecks
- phaseId: "canary-5"
profiles: ["sandbox-partial-phase-5"]
percentage: 50
analysis:
# 30 minutes.
duration: 1800s
googleCloud:
alertPolicyChecks:
sandboxPartialDeploymentAlertPolicyChecks
- phaseId: "stable"
profiles: ["sandbox"]
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 container images add-tag $DEPLOYED_IMAGE \
${BASE_IMAGE}:live-cd-${TARGET_ID} --quiet
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-schema-deploy-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-schema-deploy-${TARGET_ID}.yaml
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-deploy-gke-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-deploy-gke-${TARGET_ID}.yaml
analysis:
# 30 minutes.
duration: 1800s
googleCloud:
alertPolicyChecks:
sandboxStableDeploymentAlertPolicyChecks
- targetId: production
strategy:
canary:
customCanaryDeployment:
phaseConfigs:
- phaseId: "canary-1"
profiles: ["production-partial-phase-1"]
percentage: 10
predeploy:
tasks:
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-schema-verify-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-schema-verify-${TARGET_ID}.yaml
analysis:
# 1 hour.
duration: 3600s
googleCloud:
alertPolicyChecks:
productionPartialDeploymentAlertPolicyChecks
- phaseId: "canary-5"
profiles: ["production-partial-phase-5"]
percentage: 50
analysis:
# 1 hour.
duration: 3600s
googleCloud:
alertPolicyChecks:
productionPartialDeploymentAlertPolicyChecks
- phaseId: "stable"
profiles: ["production"]
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 container images add-tag $DEPLOYED_IMAGE \
${BASE_IMAGE}:live-cd-${TARGET_ID} --quiet
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-sync-and-tag.yaml .
gcloud builds submit --no-source --config=cloudbuild-sync-and-tag.yaml
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-schema-deploy-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-schema-deploy-${TARGET_ID}.yaml
- type: container
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
env:
TARGET_ID: ${{ target.id }}
TAG_NAME: ${{ deploy_params['tag_name'] }}
PROJECT_ID: ${{ deploy_params['project_id'] }}
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud storage cp gs://${PROJECT_ID}-deploy/${TAG_NAME}/cloudbuild-deploy-gke-${TARGET_ID}.yaml .
gcloud builds submit --no-source --config=cloudbuild-deploy-gke-${TARGET_ID}.yaml
analysis:
# 1 hour.
duration: 3600s
googleCloud:
alertPolicyChecks:
productionStableDeploymentAlertPolicyChecks
---
apiVersion: deploy.cloud.google.com/v1
kind: Automation
metadata:
name: deploy-nomulus/auto-advance-canary
description: Automatically advances rollouts through canary-1 and canary-5 phases in non-prod.
# Placeholder: Replace with project service account.
serviceAccount: serviceAccount
selector:
targets:
- id: crash
- id: sandbox
rules:
- advanceRolloutRule:
id: advance-canary-phases
sourcePhases:
- "canary-1"
- "canary-5"
wait: 0m
---
apiVersion: deploy.cloud.google.com/v1
kind: Automation
metadata:
name: deploy-nomulus/auto-promote-crash-to-sandbox
description: Automatically promotes release to sandbox after successful rollout in crash.
# Placeholder: Replace with project service account.
serviceAccount: serviceAccount
selector:
targets:
- id: crash
rules:
- promoteReleaseRule:
id: promote-crash-to-sandbox
destinationTargetId: "sandbox"
wait: 0m