diff --git a/gocd/templates/chartcuterie.jsonnet b/gocd/templates/chartcuterie.jsonnet index 5c43176..07274f1 100644 --- a/gocd/templates/chartcuterie.jsonnet +++ b/gocd/templates/chartcuterie.jsonnet @@ -19,7 +19,7 @@ local pipedream_config = { stage: 'deploy-primary', elastic_profile_id: 'chartcuterie', }, - exclude_regions: ['s4s', 'customer-1', 'customer-2', 'customer-3', 'customer-4', 'customer-6', 'customer-7'], + exclude_regions: ['customer-1', 'customer-2', 'customer-3', 'customer-4', 'customer-6', 'customer-7'], }; pipedream.render(pipedream_config, chartcuterie) diff --git a/gocd/templates/pipelines/chartcuterie.libsonnet b/gocd/templates/pipelines/chartcuterie.libsonnet index 63a59f6..c12aedf 100644 --- a/gocd/templates/pipelines/chartcuterie.libsonnet +++ b/gocd/templates/pipelines/chartcuterie.libsonnet @@ -1,5 +1,30 @@ local gocdtasks = import 'github.com/getsentry/gocd-jsonnet/libs/gocd-tasks.libsonnet'; +local deploy_canary(region) = + if region == 'us' || region == 'de' then + [ + { + 'deploy-canary': { + fetch_materials: true, + jobs: { + deploy: { + timeout: 600, + elastic_profile_id: 'chartcuterie', + environment_variables: { + LABEL_SELECTOR: 'service=chartcuterie,env=canary', + }, + tasks: [ + gocdtasks.script(importstr '../bash/deploy.sh'), + gocdtasks.script(importstr '../bash/wait-canary.sh'), + ], + }, + }, + }, + }, + ] + else + []; + function(region) { environment_variables: { // SENTRY_REGION is used by the dev-infra scripts to connect to GKE @@ -33,24 +58,7 @@ function(region) { }, }, }, - { - 'deploy-canary': { - fetch_materials: true, - jobs: { - deploy: { - timeout: 600, - elastic_profile_id: 'chartcuterie', - environment_variables: { - LABEL_SELECTOR: 'service=chartcuterie,env=canary', - }, - tasks: [ - gocdtasks.script(importstr '../bash/deploy.sh'), - gocdtasks.script(importstr '../bash/wait-canary.sh'), - ], - }, - }, - }, - }, + ] + deploy_canary(region) + [ { 'deploy-primary': { fetch_materials: true,