Is it possible to configure a job in a gitlab pipeline to only run once, when a merge request is created?
Using the rule "
'$CI_PIPELINE_SOURCE == "merge_request_event"'
" does not work, as it will also be triggered when there are new commits to the branch with the open merge request.
You can use workflow to manage your pipeline. For example:
This workflow will only be triggered when merge, default branch commit, schedule