Easy way to enable/disable pipeline stages

Presently, we can enable/disable stages only through .yml file. Which requires updating the file, creating a MR and merging it to see the changes in the pipeline. This is cumbersome process. It would be good to support to enable/disable stages using configuration UI once the basic pipeline has been created using yml file.

Many times some stages fail because of issues with software update like code analysis, coverity scan etc having easy way to disable the stages will be very helpful.

Hi there!

Couple of thoughts:

  1. you can create customized pipelines based on changes, branches, etc (“when” comes to mind) : https://docs.gitlab.com/ee/ci/yaml/#when

  2. Building on #1 - you could create “when:manual” jobs & run these if you want the job to kickoff in the pipeline view.

If neither of the above works then suggest creating an issue on gitlab.com -> https://gitlab.com/groups/gitlab-org/-/boards/1290681?&label_name[]=UX&label_name[]=devops%3A%3Averify

These methods are to enable/disable jobs. The question was about stages. Is there a facility to handle entire stages?

Hi Frakman -

To add - I’ve been using CI rules to pass variables to skip jobs & stages.

Here’s an example of a cross project pipeline that uses variables & rules using two projects:

Project A / developer code
Project B / Terraform/IaC code


  1. Project A calls Project B to deploy infrastructure
  2. Project B runs the stages & jobs if there’s a match on a passed variable. The variable & value = CLUSTER_STATE & “UP”
  3. Project B returns a completion to Project A.
  4. Project A “builds” code.
  5. Project A then calls Project B to run a new pipeline. The variable passed & value = CLUSTER_STATE & “DOWN”
  6. Project B ONLY runs a single stage/job - the “destroy” stage & job.

The linked projects are a step above pseudocode. I wanted to test out the Terraform state management that we recently released.

Does this help?


1 Like