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

1

8

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".

Publicity answered 20/4, 2022 at 4:42 Comment(0)
P
7

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

Phoebe answered 21/4, 2022 at 0:30 Comment(1)
Thank you for making the effort to respond, I appreciate the clarification.Publicity

© 2022 - 2024 — McMap. All rights reserved.