Add custom names to pipelines with `workflow:name:`
Release notes
For many users the same pipeline can be run with different variables or under different conditions creating very different outcomes from a successful pipeline. It has been hard to determine which version of that pipeline ran since there is no indication about the inputs used for that particular run. While tags for source like scheduled
can help it is still difficult to identify specific pipelines.
Now you can set a pipeline name using the keyword workflow:name
to better identify the pipeline with string, a CI/CD variable or a combination of both.
Problem to solve
This issue was opened from the discussion in #27133 (comment 1079444238).
A pipeline run can have different jobs, depending on conditions like presence of environment variables. For example, there could be build pipelines, deployment pipelines, QA pipelines, etc.
However, the pipeline list and details pages have no way to distinguish different pipelines, other than by manually checking which jobs are present in the pipeline.
The ability to add a custom name to pipelines would allow users to distinguish between different pipelines with a human friendly name. The ability to filter pipelines (on the list page) by the name would allow users to view all similar pipelines (for example, all build pipelines or all deploy pipelines).
Intended users
Users who search for particular pipelines on the pipeline list page, or need to identify a pipeline without needing to know which jobs are part of which pipeline.
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Priyanka (Platform Engineer)
- Sidney (Systems Administrator)
- Rachel (Release Manager)
- Simone (Software Engineer in Test)
User experience goal
The user should be able to use the UI to:
- Identify a pipeline on the list page without having to look at which jobs were included in the pipeline.
- Filter pipelines on the list page so that only pipelines with a given
name
are shown.
Proposal
Define name attribute
Allow an optional name
attribute in .gitlab-ci.yml
under workflow
. This attribute defines the name of a pipeline. If the attribute is not present, the pipeline has no name.
workflow:
name: '$PIPELINE_NAME'
rules:
- if: $SCHEDULED_BUILD_PIPELINE == 'true'
PIPELINE_NAME: 'Scheduled build pipeline'
- if: $DEPLOYMENT == 'true'
PIPELINE_NAME: 'Deploy $VERSION'
In the above example, all pipelines where $SCHEDULED_BUILD_PIPELINE
is set to true, will have their name set to Scheduled build pipeline
. All pipelines where $DEPLOYMENT
is set to true
will have their name set to something like Deploy v1.2.3
.
The maximum length of the pipeline name will be 255 characters.
Display name on pipelines list page
Display the pipeline name on the list page.
- Instead of the commit message?
- What if the pipeline doesn't have a name?
Display name on pipeline details page
Display the name on the details page, if the pipeline has a name.
Filter pipelines by name on list page
- Should it be a full text search, similar to how we search through issue list by title or description?
- Or should a list of all names be displayed when a user starts to filter by name, similar to how we search issues by label?
Design issue for searching/filtering by name on pipelines list page: #376097.
Further details / Implementation plan
-
Add a title
column to theci_pipeline_metadata
table - !97139 (merged). -
Allow pipeline name
to be defined underworkflow
in.gitlab-ci.yml
- !97502 (merged). -
Rename title
column in database toname
- !101196 (merged). -
Allow variables to be used in workflow:name
- !101399 (merged). -
Display name on pipeline list and details pages - !101194 (merged). -
Allow pipelines to be filtered by name on the list page.(Will be implemented in #376097) -
Add pipeline name to Slack notifications - !103892 (merged). -
Add filtering by name to the public pipelines API.(Will be implemented in #376097) -
Roll out feature flag -
Remove feature flag(Will be removed as part of #376095 (closed))
Documentation
Availability & Testing
Available Tier
- Free
Feature Usage Metrics
What does success look like, and how can we measure that?
Is this a cross-stage feature?
What is the competitive advantage or differentiation for this feature?
Links / references
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.