Skip to content

Instantly share code, notes, and snippets.

@jayco
Created June 25, 2020 07:46
Show Gist options
  • Save jayco/5a96351d7a23f851cc5396a345884e95 to your computer and use it in GitHub Desktop.
Save jayco/5a96351d7a23f851cc5396a345884e95 to your computer and use it in GitHub Desktop.
Concurrency Gate
steps:
- command: echo "running unit tests"
key: unit-tests
######################
# START OF GATE 1 #
######################
- command: "exit 0" # start the gate region by using a no-op
concurrency_group: gate
concurrency: 1
- wait
- command: echo "running deployment"
key: dep
- command: echo "running e2e tests"
parallelism: 3
depends_on: dep
- wait
- command: "exit 0" # end the gate region by using a no-op
concurrency_group: gate
concurrency: 1
######################
# END OF GATE 1 #
######################
- command: echo "running changelog publication"
@jayco
Copy link
Author

jayco commented Jun 25, 2020

This example shows using a concurrency gate to block out a deployment and e2e test to allow the e2e tests to run in parallel, while still preserving a concurrency of 1 for the surrounding block.

You can view this running with three builds here:

Screen Shot 2020-06-25 at 5 26 54 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment