gitlab-ci-local icon indicating copy to clipboard operation
gitlab-ci-local copied to clipboard

How to simulate merge requests or tag pushes etc?

Open chrisbecke opened this issue 2 months ago • 1 comments

Is your feature request related to a problem? Please describe.

Running gitlab-ci-local simulates a pipeline triggered by a git push. CI_PIPELINE_SOURCE is push and CI_COMMIT_BRANCH is the current branch.

I could simulate a tag or merge request, or manual pipeline even by overriding multiple CI_* variables but thats hard to get right manually.

It would be a boon to testing pipeline outcomes if the pipeline source (merge_request, push, trigger etc) and source (branch or tag) could be specified and the correct variables actually got set up.

chrisbecke avatar Oct 17 '25 08:10 chrisbecke

We could call the cli option --pipeline-source, please rename the title and update the description to match, our idea.

Or make a PR 😆

firecow avatar Oct 17 '25 15:10 firecow