How do I run complex pipeline (containing include & extends)

I am trying to find a way to run gitlab runners locally such that I can run a complex gitlab pipeline locally, one that has alot of ‘include’ and ‘extends’ and as such contains many sub folders dedicated to jobs.

One solution would be to link local runner to gitlab instance and then the local runners will only be triggered when one pushed the code to the gitlab instance. The problem with this is that it defeats the purpose of testing the pipeline locally without needing to push.

Another solution would be to use a gitlab docker container but that will be resource intensive and will always need to sync changes between gitlab instance and the dockerized gitlab.

I have also tried using the gitlab-ci-local package but faced several syntax related issue for one of the stages (when pulling docker image it was referencing directory instead of the image: Error: Command failed with exit code 1: docker pull /security-products/semgrep:4)

There is GitHub - firecow/gitlab-ci-local: Tired of pushing to test your .gitlab-ci.yml? and that’s it. GitLab does not have any feature or way how to test pipeline locally :frowning:

1 Like