Skip to content

Commit

Permalink
chore(gocd): adding s4s deploy (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanWoodard authored Jun 25, 2024
1 parent bb63761 commit 4e7103b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gocd/templates/chartcuterie.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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)
44 changes: 26 additions & 18 deletions gocd/templates/pipelines/chartcuterie.libsonnet
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4e7103b

Please sign in to comment.