Cross-project pipeline visualization does not work in core, but does work on gitlab.com (private)
Summary
Cross-project pipeline visualization is a feature that is enabled in all cases, but is gated behind the use of the trigger
keyword or the curl
command to trigger a pipeline via the API. It is not consistently available, however:
action | gitlab.com free? | self-managed unlicensed? | self-managed FOSS? |
---|---|---|---|
see visualization of connected pipelines | yes | yes | no |
create linked pipeline using trigger keyword |
yes | yes | no |
create linked pipeline using curl with attribution |
yes | yes | no |
This issue will make self-managed FOSS behave the same as the other two.
https://gitlab.com/gitlab-org/gitlab-ce/issues/63497#note_212438724 contains a thread with additional detail. Per @matteeyah:
It looks like triggering pipelines with a trigger is available in core, but not triggering with a
CI_JOB_TOKEN
- according toCi::PipelineTriggerService
. It was originally added to core with https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2017, but it somehow ended up in the paid version.
Steps to reproduce
Trigger a pipeline as follows (replace <<ID>>
with a project ID you have permissions to start):
image: ubuntu
build:
script:
- echo $CI_API_V4_URL/projects/285/trigger/pipeline
- apt-get -y update
- apt-get -y install curl
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master $CI_API_V4_URL/projects/<<ID>>/trigger/pipeline
On gitlab.com free, this works fine. On self-managed core, this returns an error.
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
Error starting the pipeline (404)
What is the expected correct behavior?
Pipeline started and visualized
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: 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)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)