Add an optional custom name/description to CI jobs and stages
Proposal
I'm proposing a feature that will allow defining an optional, human friendly, description for each stage and job in a pipeline.
With complex pipelines, made of several files and different engaging conditions, like release-tools or many other project we utilize to package and deliver GitLab, it is really hard to maintain to have a job name that is unique, descriptive and shorter than the name cutting limit we apply on the pipeline UI.
The above screenshot is an annotated fraction of a coordinated pipeline that release and deploy a new GitLab auto-deploy package. (It is not even the first half of it, and there are many child pipelines)
A few words on annotations:
-
yellow notes
: CI stages are global, but we do not have all of them in each type of pipeline, so we namespace stages to better identify a job inside a pile of yaml files, but on the pipeline page that namespace is only creating noise, as each stage on the pipeline will have the same prefix. -
red notes
: there is a maximum length for stage names, because of the above some stage are shortened removing the important information but keeping the namespace that bring no value. -
blu notes
: we tend to classify common jobs, we have standard names likewait
,notify
,deploy
,qa
,metrics
, and so on. This classification system works great on the yaml file to define interjob dependencies, but wastes a lot of screen space in the already busy pipeline page and could easily be replaced with a descriptive emoji.
Proposed syntax
Here is an example based on some of the jobs we have on the screenshot to better explain the feature. The new key is title
but could be description
or any other fitting name.
stages:
- id: coordinated:build
title: "Build"
- id: coordinated:prepare
title: "Prepare for deploy"
- id: coordinated:deploy:staging-canary-and-ref
title: "Deploy staging and canary-ref"
wait:cng:
title: "⏳ CNG"
stage: coordinated:build
prepare: # title is not mandatory
stage: coodinated:prepare
deploy:gstg-ref:
title: "🚀 gstg-ref"
stage: coordinated:deploy:staging-canary-and-ref
needs:
- wait:cng