HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to test the CI/CD pipeline itself?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
itselfthetesthowpipeline

Problem

I have gitlab CI/CD defined through .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

Context

StackExchange DevOps Q#15450, answer score: 1

Revisions (0)

No revisions yet.