'GitLab-CI: Why do stageless pipelines show all jobs under stage "test"? Can this be changed?

I've moved my pipeline to a "stageless" one, simply by using needs rules and removing all stage declarations.

This all works fine, but I've noticed that all my jobs now appear under a single stage called "Test".

This is not a functional problem, but it does make developers question why it's the case. Is there any way to change this default stage name with Cloud-hosted GitLab?

Is it as simple as setting all of the jobs to use stage with the same value? Seems like a bit of a hack, and contrary to the instructions to "remove all stage keywords from .gitlab-ci.yml".



Solution 1:[1]

As per the documentation on stages,

If a job does not specify a stage, the job is assigned the test stage.

For your question:

Is there any way to change this default stage name with Cloud-hosted GitLab?

You can define a single stage by using the following:

stages:
  - some-other-name

and then referring to the new stage name (some-other-name) in each of your jobs, because (from the same reference above)

if a stage is defined but no jobs use it, the stage is not visible in the pipeline

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 lyzlisa