Allow AUTO_DEVOPS_STAGE_DISABLE to skip a whole stage of an Auto DevOps pipeline
Problem to solve
Currently, to disable a whole stage of we'd need to either:
- Disable each job separately by adding variables like: TEST_DISABLED, CODE_QUALITY_DISABLED, etc... or
- Create a custom
.gitlab-ci.yml
that overrides ourAuto-DevOps.gitlab-ci.yml
and comments out the unneeded stage.
In some cases, when you don't need the custom .gitlab-ci.yml
, it would be simpler if one could run a pipeline without the need of adding any files to their repo.
Intended users
Anyone with access to running pipelines.
Proposal
Scenario 1) User goes to "Settings -> CI / CD -> Variables" and set AUTO_DEVOPS_STAGE_DISABLE
to test
Scenario 2) User goes to "CI / CD -> Pipelines -> Run Pipeline" and set AUTO_DEVOPS_STAGE_DISABLE
to test
Any of the above would skip the test
stage of the pipeline
Permissions and Security
Keep the same permissions and concerns as to add any kind of variable.
Documentation
Only necessary documentation is to add this variable to the list of Auto DevOps environment variables.
Testing
We need to test that when adding the variable the stage is really skipped.
What does success look like, and how can we measure that?
Create a project with Auto DevOps. Use the variable to remove any stage like build
, test
, etc. Run the pipeline and check if the stage was skipped.