Skip to content

Allow variables to be used in workflow:name

Reuben Pereira requested to merge rp/pipeline-title-variable-expansion into master

What does this MR do and why?

Describe in detail what your merge request does and why.

In !97502 (merged), we added workflow:name as an optional attribute, which applies a name to pipelines. This MR adds the ability to use variables in workflow:name. The variables can be nested.

#372538 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable the pipeline_name feature flag by running the following in a Rails console: Feature.enable(:pipeline_name).
  2. Add the following to .gitlab-ci.yml in GDK/GCK:
    workflow:
      name: '$PIPELINE_NAME'
      rules:
        - variables:
            PIPELINE_NAME: 'Pipeline for $CI_COMMIT_BRANCH'
  3. Start a pipeline.
  4. In rails console, check that the pipeline name is set to Pipeline for master (or whichever branch you ran the pipeline in): Ci::Pipeline.find(<id>).title

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Furkan Ayhan

Merge request reports

Loading