snippetMinor
How to test the CI/CD pipeline itself?
Viewed 0 times
itselfthetesthowpipeline
Problem
I have gitlab CI/CD defined through
It runs different jobs if the pipeline is triggered manually, from a merge request or from a scheduled pipeline.
It accepts a bunch of environment variables used to modify some job behaviors or launch specific jobs (for example for developers to build debug images).
When I change
Do I have a way to automate that? Is there other CI/CD tools that allow that?
.gitlab-ci.yml.It runs different jobs if the pipeline is triggered manually, from a merge request or from a scheduled pipeline.
It accepts a bunch of environment variables used to modify some job behaviors or launch specific jobs (for example for developers to build debug images).
When I change
.gitlab-ci.yml I currently have to run manual tests triggering the pipelines in all possible ways with all the different variables to ensure I have no regression.Do I have a way to automate that? Is there other CI/CD tools that allow that?
Solution
You should use CI lint.
See this to simulate your CI/CD pipeline and validate when you make changes to the yml file - https://docs.gitlab.com/ee/ci/lint.html
See this to simulate your CI/CD pipeline and validate when you make changes to the yml file - https://docs.gitlab.com/ee/ci/lint.html
Context
StackExchange DevOps Q#15450, answer score: 1
Revisions (0)
No revisions yet.