I want to restrict the automatic creation of a pipeline as much as possible, as our pipelines take quite long and we have very limited resources.
A pipeline should therefore only be created if done manually or a push occurs on a specific branch. The thing I’m having troubles with is the “if done manually”-part.
Merge request events all seem to trigger the pipeline automatically. I’d like to stop that, which is easily done by checking if
$CI_PIPELINE_SOURCE == "merge_request_event". However, manually pressing the “Run Pipeline”-Button on the Merge Request page also counts as a
I’ve found no way to differentiate these two cases.
The more common case a pipeline is triggered on accident that way is when we’re creating a merge request. So I’d like to either disable that those events will be sent (or trigger a pipeline) or want some way to differentiate between manually starting the pipeline on the MR page and all other MR events.
Can anybody help me with that?