No permissions to trigger downstream pipeline
Summary
An upstream project with a trigger to downstream projects returns error: No permissions to trigger downstream pipeline
Steps to reproduce
- Create an upstream project
- Create a downstream project
- Create an upstream pipeline to trigger downstream pipeline
- Start the upstream pipeline with a user who has developer rights on the downstream project
Example Project
What is the current bug behavior?
We have an upstream project: https://gitlab.com/NebulousLabs/Sia
with trigger in gitlab-ci.yml
:
antfarm-version-tests:
stage: test
trigger:
project: NebulousLabs/Sia-Ant-Farm
strategy: depend
variables:
PARENT_CI_PIPELINE_SOURCE: $CI_PIPELINE_SOURCE
only:
- master
According to the documentation from: https://docs.gitlab.com/ee/ci/multi_project_pipelines.html#triggering-a-downstream-pipeline-using-a-bridge-job
The user that created the upstream pipeline needs to have access rights to the downstream project (my/deployment in this case). If a downstream project is not found, or a user does not have access rights to create a pipeline there, the staging job is marked as failed.
The user: https://gitlab.com/pjbrone who started the upstream pipeline: https://gitlab.com/NebulousLabs/Sia/-/pipelines/244881112
has permissions to start a downstream pipeline, example pipeline he has started manually: https://gitlab.com/NebulousLabs/Sia-Ant-Farm/-/pipelines/244936968
Gets error:
No permissions to trigger downstream pipeline
in the upstream pipeline.
What is the expected correct behavior?
Downstream pipeline is triggered correctly.
Relevant logs and/or screenshots
https://gitlab.com/NebulousLabs/Sia/-/pipelines/244881112
antfarm-version-tests
job fails with a permission error
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)