Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PIPE-5084 Update job references to support serial groups #325

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

liamclarkedev
Copy link
Contributor

Jira

Description

Serial groups are groups of jobs that run in series, this is a new property that can be set for any job type.

For example, creating multiple pipelines at the same time with the below config will result in all pipelines running test and build but only a single pipeline will run deploy at a time.

version: 2.1

jobs:
  test:
    type: no-op

  build:
    type: no-op

  deploy:
    type: no-op

workflows:
  main-workflow:
    jobs:
      - test
      - build
      - deploy:
          serial-group: << pipeline.project.slug >>/deploy-group
          requires:
            - test
            - build

Implementation details

Serial group keys when compiled:

  • Are optional and defined on the job invocation.
  • Must be a non-empty string fewer than 512 characters.

Note: this is after compilation, limiting what we can validate here, this would be valid.

parameters:
  key-longer-than-512-chars:
    type: string
    default: "foo"

  ...
  serial-group: << pipeline.parameters.key-longer-than-512-chars >>

How to validate

  • Unit tests pass.
  • Paste the above config in any test project.
  • Push a change and confirm it works.

@liamclarkedev liamclarkedev force-pushed the pipe-5084/serial-groups branch from 8d96666 to 4de4034 Compare February 24, 2025 12:42
@liamclarkedev liamclarkedev changed the title PIPE-5084 Update job references to support serial groups feat: PIPE-5084 Update job references to support serial groups Feb 24, 2025
@liamclarkedev liamclarkedev requested a review from a team February 24, 2025 12:45
Serial groups are groups of jobs that run in series, this is a new
property that can be set for any job type.

Example: creating multiple pipelines at the same time with the below
config will result in all pipelines running `test` and `build` but only
a single pipeline will run `deploy` at a time.

```yaml
version: 2.1

jobs:
  test:
    type: no-op

  build:
    type: no-op

  deploy:
    type: no-op

workflows:
  main-workflow:
    jobs:
      - test
      - build
      - deploy:
          serial-group: deploy-group
          requires:
            - test
            - build
```
@liamclarkedev liamclarkedev force-pushed the pipe-5084/serial-groups branch from 4de4034 to 4d0591b Compare February 26, 2025 15:46
@liamclarkedev liamclarkedev merged commit cc5e970 into main Feb 27, 2025
6 checks passed
@liamclarkedev liamclarkedev deleted the pipe-5084/serial-groups branch February 27, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants