Skip to content

Allow pipeline name to be defined under workflow

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

What does this MR do and why?

Describe in detail what your merge request does and why.

Allow an optional pipeline name to be defined under workflow in .gitlab-ci.yml. The title is stored in the ci_pipeline_metadata table, and will be displayed on the UI in subsequent MRs.

This change is behind a feature flag called pipeline_name.

This is not very useful without the ability to use variables in the name, since all pipelines will have the same name. Variable substitution will be added in a subsequent MR.

Note that the database column in ci_pipeline_metadata table is called title. I'll rename it in a separate MR.

Ex:

workflow:
  name: 'Pipeline name'

#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 Feature.enable(:pipeline_name) in your Rails console.
  2. Edit your project's .gitlab-ci.yml file.
  3. Edit the workflow:name to add a pipeline name.
    workflow:
      - name: 'Build pipeline'
  4. Start a pipeline.
  5. Open your Rails console and check that Ci::Pipeline.last.title is Build pipeline.

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 Reuben Pereira

Merge request reports

Loading