I have a project that has triggers that are executed from another projects’ CI pipeline.
For that trigger to be executed, the user on the triggering project, needs to have merge permissions for that branch and I would like to avoid that.
Is there a way of allowing users to trigger pipelines without giving them merge permissions?
A snippet of the triggering proyect’s CI:
# Project 1
trigger:
stage: deploy
image: alpine:latest
before_script:
- apk add --upgrade curl
script:
- curl -X POST
-F token=${CI_JOB_TOKEN}
-F ref=master
https://gitlab.com/api/v4/projects/${TF_PROJECT_ID}/trigger/pipeline
A snippet of the trigger
# Project 2
validate:
stage: validate
script:
- env
only:
- pipelines
- triggers