Pass push options to merge request pipelines creation
What does this MR do and why?
Related to #349362 (closed)
This is a second part of !87030 (merged) given that adding a parameter to a sidekiq worker requires a multi-step deployment. In this MR we are passing the push options from Git::BranchPushService
to UpdateMergeRequestsWorker
and to MergeRequests::CreatePipelineWorker
in case of async pipeline creation.
This allows to finally have the merge request pipelines recognizing push options and be skipped properly.
Screenshots or screen recordings
I had to lower the resolution in order to upload the video
Before | After |
---|---|
How to set up and validate locally
- Setup merge request pipelines in
.gitlab-ci.yml
. commit to a new branch and open a merge request for the changes.
mr-job:
script: echo
only: [merge-requests]
normal-job:
script: echo
-
Ensure the merge request pipeline is created with
mr-job
only. -
make a change to
main
branch. Separate file should be sufficient. -
The MR should show that it's
1 commit behind
the target branch. -
Use the rebase API to with
skip_ci: true
curl --request PUT -d skip_ci=true --header "PRIVATE-TOKEN: $GITLAB_LOCALHOST_TOKEN" http://localhost:3000/api/v4/projects/20/merge_requests/2/rebase
-
Ensure that 2 pipelines were skipped: 1 branch pipeline and 1 merge request pipeline
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.