Skip to content

Commit

Permalink
Enable retry of successful deployment steps (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c authored Jan 7, 2021
1 parent 141c802 commit 2d2bf99
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .changeset/eleven-phones-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'skuba': patch
---

**template:** Enable retry of successful deployment steps

This should be used with caution, but may be necessary if you need to rapidly roll back a broken deployment.
12 changes: 10 additions & 2 deletions template/express-rest-api/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ configs:
env:
NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token

- &deploy
concurrency: 1
retry:
manual:
# Only use this if you need to roll back a deployment ASAP.
# Always follow up with a proper revert or fix in Git history.
permit_on_passed: true

- &dev
agents:
queue: <%- devBuildkiteQueueName %>
Expand Down Expand Up @@ -41,8 +49,8 @@ steps:
branches: '!master'

- <<: *dev
<<: *deploy
label: 🤞 Deploy Dev
concurrency: 1
concurrency_group: <%- teamName %>/deploy/gantry/<%- devGantryEnvironmentName %>
plugins:
- seek-jobs/gantry#v1.2.9:
Expand All @@ -56,9 +64,9 @@ steps:
- wait

- <<: *prod
<<: *deploy
label: 🚀 Deploy Prod
branches: master
concurrency: 1
concurrency_group: <%- teamName %>/deploy/gantry/<%- prodGantryEnvironmentName %>
plugins:
- seek-jobs/gantry#v1.2.9:
Expand Down
12 changes: 10 additions & 2 deletions template/koa-rest-api/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ configs:
env:
NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token

- &deploy
concurrency: 1
retry:
manual:
# Only use this if you need to roll back a deployment ASAP.
# Always follow up with a proper revert or fix in Git history.
permit_on_passed: true

- &dev
agents:
queue: <%- devBuildkiteQueueName %>
Expand Down Expand Up @@ -41,8 +49,8 @@ steps:
branches: '!master'

- <<: *dev
<<: *deploy
label: 🤞 Deploy Dev
concurrency: 1
concurrency_group: <%- teamName %>/deploy/gantry/<%- devGantryEnvironmentName %>
plugins:
- seek-jobs/gantry#v1.2.9:
Expand All @@ -56,9 +64,9 @@ steps:
- wait

- <<: *prod
<<: *deploy
label: 🚀 Deploy Prod
branches: master
concurrency: 1
concurrency_group: <%- teamName %>/deploy/gantry/<%- prodGantryEnvironmentName %>
plugins:
- seek-jobs/gantry#v1.2.9:
Expand Down
5 changes: 5 additions & 0 deletions template/lambda-sqs-worker/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ configs:
- docker-compose#v3.7.0:
dependencies: false
run: app
retry:
manual:
# Only use this if you need to roll back a deployment ASAP.
# Always follow up with a proper revert or fix in Git history.
permit_on_passed: true

- &dev
agents:
Expand Down

0 comments on commit 2d2bf99

Please sign in to comment.