Merge request Pipeline

We are trying to create Merge request pipeline for security testing to specific target branch “develop” regardless of any source branches
One of our source branch is protected and allowed only for maintainer to merge and push.When a developer create merge request from that protected source branch to target “develop” branch,merge request pipeline wont run.Whereas when a maintainer create merge request from the same source branch to target branch develop,merge request pipeline is running without any problem
Question is if the source branch is protected (Only maintainer allowed to merge or push) and merge request pipeline wont run for developer role user?

Allowing developer role to merge to protected branch works.

sample code

stage: SAST

  • .tf_variables_dev
    name: hashicorp/terraform:light
  • “/usr/bin/env”
  • “PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/go/bin”
    allow_failure: true
  • if: $CI_PIPELINE_SOURCE == “merge_request_event” && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == “develop”
    when: always
    allow_failure: true
  • when : never
1 Like