Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions libs/getsentry.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
],
// Test regions will deploy in parallel to the regions above
test_regions: [
's4s',
],
is_st(region):: (region == 's4s' || std.startsWith(region, 'customer-')),
is_st(region):: std.startsWith(region, 'customer-'),
}
5 changes: 2 additions & 3 deletions libs/pipedream.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,8 @@ local generate_region_pipeline(pipedream_config, pipeline_fn, region, display_or
// This stage is added to ensure a rollback doesn't cause
// a deployment train.
//
// i.e. During a rollback, s4s and US re-runs the final stage
// The s4s final stage completes and causes the US pipeline to
// re-run. With `pipeline-complete` as the final stage, it isn't
// i.e. During a rollback, US re-runs the final stage. With
// `pipeline-complete` as the final stage, it isn't
// re-run by a rollback, preventing this domino effect.
gocd_stages.basic('pipeline-complete', [gocd_tasks.noop], { fetch_materials: false }),
],
Expand Down
56 changes: 0 additions & 56 deletions test/pipedream.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ test("ensure manual deploys is expected structure in serial", async (t) => {
t.deepEqual(Object.keys(got), ["format_version", "pipelines"]);
t.truthy(got.pipelines["deploy-example"]);
t.truthy(got.pipelines["deploy-example-s4s2"]);
t.truthy(got.pipelines["deploy-example-s4s"]); // s4s is now a test region

// Ensure the trigger has the right initial material
const trigger = got.pipelines["deploy-example"];
Expand All @@ -37,21 +36,6 @@ test("ensure manual deploys is expected structure in serial", async (t) => {
shallow_clone: true,
},
});

// Ensure s4s (test region) depends on trigger pipeline, deployed in parallel
const s4s = got.pipelines["deploy-example-s4s"];
t.deepEqual(s4s.materials, {
"deploy-example-pipeline-complete": {
pipeline: "deploy-example",
stage: "pipeline-complete",
},
example_repo: {
branch: "master",
destination: "example",
git: "git@github.com:getsentry/example.git",
shallow_clone: true,
},
});
});

test("ensure manual deploys is expected structure in parallel", async (t) => {
Expand All @@ -63,7 +47,6 @@ test("ensure manual deploys is expected structure in parallel", async (t) => {
t.deepEqual(Object.keys(got), ["format_version", "pipelines"]);
t.truthy(got.pipelines["deploy-example"]);
t.truthy(got.pipelines["deploy-example-s4s2"]);
t.truthy(got.pipelines["deploy-example-s4s"]);

// Ensure the trigger has the right initial material
const trigger = got.pipelines["deploy-example"];
Expand All @@ -90,21 +73,6 @@ test("ensure manual deploys is expected structure in parallel", async (t) => {
shallow_clone: true,
},
});

// Ensure s4s also depends on the trigger material (parallel deploy)
const s4s = got.pipelines["deploy-example-s4s"];
t.deepEqual(s4s.materials, {
"deploy-example-pipeline-complete": {
pipeline: "deploy-example",
stage: "pipeline-complete",
},
example_repo: {
branch: "master",
destination: "example",
git: "git@github.com:getsentry/example.git",
shallow_clone: true,
},
});
});

test("ensure auto deploys is expected structure in serial", async (t) => {
Expand All @@ -116,7 +84,6 @@ test("ensure auto deploys is expected structure in serial", async (t) => {
t.deepEqual(Object.keys(got), ["format_version", "pipelines"]);
t.falsy(got.pipelines["deploy-example"]);
t.truthy(got.pipelines["deploy-example-s4s2"]);
t.truthy(got.pipelines["deploy-example-s4s"]); // s4s is now a test region
t.truthy(got.pipelines["rollback-example"]);

// Ensure s4s2 has just the repo material (first prod region)
Expand All @@ -130,17 +97,6 @@ test("ensure auto deploys is expected structure in serial", async (t) => {
},
});

// Ensure s4s (test region) has just the repo material (deployed in parallel)
const s4s = got.pipelines["deploy-example-s4s"];
t.deepEqual(s4s.materials, {
example_repo: {
branch: "master",
destination: "example",
git: "git@github.com:getsentry/example.git",
shallow_clone: true,
},
});

// Rollback only includes prod regions, not test regions
const r = got.pipelines["rollback-example"];
t.deepEqual(r["environment_variables"], {
Expand Down Expand Up @@ -171,7 +127,6 @@ test("ensure auto deploys is expected structure in parallel", async (t) => {
t.deepEqual(Object.keys(got), ["format_version", "pipelines"]);
t.falsy(got.pipelines["deploy-example"]);
t.truthy(got.pipelines["deploy-example-s4s2"]);
t.truthy(got.pipelines["deploy-example-s4s"]); // s4s is now a test region
t.truthy(got.pipelines["rollback-example"]);

// Ensure s4s2 has just the repo material (parallel deploy, no upstream)
Expand All @@ -185,17 +140,6 @@ test("ensure auto deploys is expected structure in parallel", async (t) => {
},
});

// Ensure s4s (test region) also has just the repo material (parallel deploy)
const s4s = got.pipelines["deploy-example-s4s"];
t.deepEqual(s4s.materials, {
example_repo: {
branch: "master",
destination: "example",
git: "git@github.com:getsentry/example.git",
shallow_clone: true,
},
});

// Rollback only includes prod regions, not test regions
const r = got.pipelines["rollback-example"];
t.deepEqual(r["environment_variables"], {
Expand Down
1 change: 0 additions & 1 deletion test/testdata/fixtures/getsentry/is-st.jsonnet
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
local getsentry = import '../../../../libs/getsentry.libsonnet';

{
s4s: getsentry.is_st('s4s'),
us: getsentry.is_st('us'),
eu: getsentry.is_st('eu'),
'customer-1': getsentry.is_st('customer-1'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local pipedream = import '../../../../libs/pipedream.libsonnet';

local pipedream_config = {
name: 'example',
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local pipedream = import '../../../../libs/pipedream.libsonnet';

local pipedream_config = {
name: 'example',
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local pipedream = import '../../../../libs/pipedream.libsonnet';
local pipedream_config = {
name: 'example',
auto_deploy: false,
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local pipedream = import '../../../../libs/pipedream.libsonnet';
local pipedream_config = {
name: 'example',
auto_deploy: false,
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local pipedream = import '../../../../libs/pipedream.libsonnet';
local pipedream_config = {
name: 'example',
include_regions: ['control'],
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local pipedream = import '../../../../libs/pipedream.libsonnet';
local pipedream_config = {
name: 'example',
include_regions: ['control'],
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local pipedream_config = {
name: 'example',
auto_deploy: false,
include_regions: ['control'],
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local pipedream_config = {
name: 'example',
auto_deploy: false,
include_regions: ['control'],
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local pipedream = import '../../../../libs/pipedream.libsonnet';
local pipedream_config = {
name: 'example',
include_regions: ['control'],
exclude_regions: ['s4s', 'us'],
exclude_regions: ['us'],
materials: {
init_repo: {
git: 'git@github.com:getsentry/init.git',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"customer-a": true,
"demo-customer": false,
"eu": false,
"s4s": true,
"us": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"customer-1",
"customer-2",
"customer-4",
"customer-7",
"s4s"
"customer-7"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,45 +194,6 @@
}
}
},
"deploy-example-s4s.yaml": {
"format_version": 10,
"pipelines": {
"deploy-example-s4s": {
"display_order": 9,
"group": "example",
"materials": {
"example_repo": {
"branch": "master",
"destination": "example",
"git": "git@github.com:getsentry/example.git",
"shallow_clone": true
}
},
"region": "s4s",
"stages": [
{
"example_stage": { }
},
{
"pipeline-complete": {
"fetch_materials": false,
"jobs": {
"pipeline-complete": {
"tasks": [
{
"exec": {
"command": true
}
}
]
}
}
}
}
]
}
}
},
"deploy-example-s4s2.yaml": {
"format_version": 10,
"pipelines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,40 +171,6 @@
}
]
},
"deploy-example-s4s": {
"display_order": 9,
"group": "example",
"materials": {
"example_repo": {
"branch": "master",
"destination": "example",
"git": "git@github.com:getsentry/example.git",
"shallow_clone": true
}
},
"region": "s4s",
"stages": [
{
"example_stage": { }
},
{
"pipeline-complete": {
"fetch_materials": false,
"jobs": {
"pipeline-complete": {
"tasks": [
{
"exec": {
"command": true
}
}
]
}
}
}
}
]
},
"deploy-example-s4s2": {
"display_order": 2,
"group": "example",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,45 +214,6 @@
}
}
},
"deploy-example-s4s.yaml": {
"format_version": 10,
"pipelines": {
"deploy-example-s4s": {
"display_order": 9,
"group": "example",
"materials": {
"example_repo": {
"branch": "master",
"destination": "example",
"git": "git@github.com:getsentry/example.git",
"shallow_clone": true
}
},
"region": "s4s",
"stages": [
{
"example_stage": { }
},
{
"pipeline-complete": {
"fetch_materials": false,
"jobs": {
"pipeline-complete": {
"tasks": [
{
"exec": {
"command": true
}
}
]
}
}
}
}
]
}
}
},
"deploy-example-s4s2.yaml": {
"format_version": 10,
"pipelines": {
Expand Down
Loading
Loading