Skip to content

Commit 0d9fd2a

Browse files
Add serial-groups section to config reference (#9259)
* add serial-groups section to config ref * changes from review * replace the word serialise * update with a caution about pipeline order protection
1 parent d5ee986 commit 0d9fd2a

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

jekyll/_cci2/configuration-reference.adoc

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,6 +2653,67 @@ A job can have the keys `requires`, `name`, `context`, `type`, and `filters`.
26532653

26542654
A job name that exists in your `config.yml`.
26552655

2656+
'''
2657+
====== `serial-group`
2658+
2659+
The `serial-group` key is used to add a property to a job to allow a group of jobs to run in series, rather than concurrently, across an organization. Serial groups control the orchestration of jobs across an organization, not just within projects and pipelines.
2660+
2661+
The `serial-group` key is configurable per job. It is not possible to configure the key for a group of jobs at this time.
2662+
2663+
The value of the `serial-group` key is a string that is used to group jobs together to run one after another. The key must meet the following requirements:
2664+
2665+
* Must be less than or equal to (≤) 512 characters, once compiled.
2666+
* Must not be blank.
2667+
* Must consist of alphanumeric characters plus, `.`, `-`, `_`, `/`.
2668+
2669+
Note the following features of serial groups:
2670+
2671+
* You can use pipeline values and parameters in the `serial-group` key.
2672+
* Serial groups will wait for five hours. After this jobs waiting in the group will be cancelled. This does not affect the standard limits that apply to a <<jobs,job's runtime>>.
2673+
2674+
[CAUTION]
2675+
====
2676+
*Pipeline order protection in serial groups*
2677+
2678+
Jobs in a serial group follow an order protection mechanism, as follows:
2679+
2680+
* Jobs start in the order they join the queue, but are _accepted_ based on pipeline number.
2681+
* If a group is waiting/running and another job in the same project attempts to join the queue with a lower pipeline number, the job is skipped.
2682+
* This immediate skip process exists to maintain order integrity, which is a safety process to avoid unexpected work in a build, for example, a deployment job running a previous version unexpectedly.
2683+
2684+
If there are no serial groups waiting/running, a pipeline with a lower number can start, such as restoring back to a previous pipeline via a rerun workflow.
2685+
====
2686+
2687+
[.table.table-striped]
2688+
[cols=4*, options="header", stripes=even]
2689+
|===
2690+
| Key | Required | Type | Description
2691+
2692+
| `serial-group`
2693+
| N
2694+
| String
2695+
| A string that is used across an org to group jobs together to run one after another. Can include pipeline values and parameters. Use this same serial group across multiple pipelines to control the orchestration of jobs across an organization.
2696+
|===
2697+
2698+
*Example:*
2699+
2700+
[,yml]
2701+
----
2702+
# Creating multiple pipelines at the same time with the below config will results in
2703+
# all pipelines running test and build but only a single pipeline will run deploy at a time.
2704+
2705+
workflows:
2706+
main-workflow:
2707+
jobs:
2708+
- test
2709+
- build
2710+
- deploy:
2711+
serial-group: << pipeline.project.slug >>/deploy-group
2712+
requires:
2713+
- test
2714+
- build
2715+
----
2716+
26562717
'''
26572718

26582719
[#requires]

0 commit comments

Comments
 (0)