https://github.com/eddiewebb/circleci-queue
CircleCI orb to block/queue jobs to enforce max concurrency limits
https://github.com/eddiewebb/circleci-queue
circleci-orbs
Last synced: 6 months ago
JSON representation
CircleCI orb to block/queue jobs to enforce max concurrency limits
- Host: GitHub
- URL: https://github.com/eddiewebb/circleci-queue
- Owner: eddiewebb
- License: mit
- Created: 2018-04-12T12:38:11.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T16:41:39.000Z (7 months ago)
- Last Synced: 2025-03-29T14:06:16.827Z (6 months ago)
- Topics: circleci-orbs
- Language: Shell
- Homepage:
- Size: 572 KB
- Stars: 77
- Watchers: 2
- Forks: 75
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **This Orb is deprecated by native CircleCI functionality.**
>
> For details, see the [Deprecation Notice issue](https://github.com/eddiewebb/circleci-queue/issues/142) and the official [CircleCI changelog entry](https://circleci.com/changelog/avoid-commit-conflicts-in-your-pipelines-with-serial-jobs/) for `serial-group`.# CircleCI Concurrency Control Orb
[](https://circleci.com/gh/eddiewebb/circleci-queue/tree/master)
[](https://github.com/eddiewebb/circleci-queue/blob/master/LICENSE)
[](https://circleci.com/orbs/registry/orb/eddiewebb/queue)
[](https://app.bors.tech/repositories/21077)CircleCI Orb to limit workflow concurrency.
Why? Some jobs (typically deployments) need to run sequentially and not parallel, but also run to completion. So CircleCI's native `auto-cancel` is not quite the right fit.
See https://github.com/eddiewebb/circleci-challenge as an example using blue/green cloud foundry deployments.## Basic Usage
This adds concurrency limits by ensuring any jobs with this step will only continue once no previous builds are running. It supports a single argument of how many minutes to wait before aborting itself and it requires a single Environment Variable `CIRCLECI_API_KEY`, which must be a **Personal API Token** (rather than a project-specific API Permissions token). This can be created at [Personal API Tokens](https://app.circleci.com/settings/user/tokens) under Users Settings. Note that the account must have write access (at least the **Contributor** role) on the Project you wish to enable this orb for. However, if the `dont-quit` parameter is enabled, view-only access (the **Viewer** role) is sufficient.
## Screenshots / Examples
Suppose we have a workflow take takes a little while to run. Normally the build (#18) will run immediately, with no queuing.
Someone else on the team makes another commit, since the first build (#18) is still running, it will queue build #19.
It's late afternoon, everyone is pushing their commits in to ensure they are good before they leave for the day. Build #20 also queues.
Meanwhile, build #19 is now allowed to move forward since build #18 finished.

Oh No! Since `1 minute` is abnormally long for things to be queued, build #20 aborts itself, letting build #19 finish uninterrupted.

# Setup
See https://circleci.com/orbs/registry/orb/eddiewebb/queue#usage-examples for current examples## Note
Queueing is not supported on forked repos. If a queue from a fork happens the queue will immediately exit and the next step of the job will begin.