Skip to content

Add pipeline name for UBI and FIPS pipelines

What does this MR do?

Add pipeline name for UBI and FIPS pipelines

A pipeline name makes it easier to detect these specific pipelines, so it is easier for release managers when finding them and checking their status.

Explain the chosen rule order

    # Run regular pipelines on pushes to regular branches that does not have an MR open
    - if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH !~ /-stable$/'
      variables:
        RUBY_VERSION: $NEXT_RUBY_VERSION
    - if: '$UBI_PIPELINE == "true"'
      variables:
        PIPELINE_TYPE: UBI_PIPELINE
    - if: '$FIPS_PIPELINE == "true"'
      variables:
        PIPELINE_TYPE: FIPS_PIPELINE
    # Run regular pipelines on pushes to stable branches
    - if: '$CI_COMMIT_BRANCH =~ /-stable$/'

The two new rules are added between the rules for non stable branches and stable branches.

GitLab CI rules evaluation stop immediately after the first match, so I need to be careful not to break other pipelines. Thus, at this position, it means:

  • It only works for stable branch pipelines (what we care now)
  • The rules after this are only about CI_COMMIT_TAG, which means they are for tagging pipelines, which don't overlap with the rules we set here - which only happen when triggering a new pipeline manually with variables.

Related issues

Ref: gitlab-com/gl-infra/delivery#20944 (closed)

Testing

I triggered a pipeline with UBI_PIPELINE=true . The pipeline's name was set as expected: https://gitlab.com/gitlab-org/build/CNG/-/pipelines/1705162820

Screenshot 2025-03-07 at 17.12.37.png

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Integration tests added to GitLab QA
  • The impact any change in container size has should be evaluated
  • New dependencies are managed with GitLab forked renovatebot
Edited by Dat Tang

Merge request reports

Loading