artifacts:expose_as not working with child pipelines
Summary
When using artifacts:expose_as
in a child pipeline, artifacts show as uploaded in the job but do not show up as links in the MR.
Steps to reproduce
-
Create a project
-
Create a file named
expose_as.txt
in the root of the project -
Create a
.gitlab-ci.yml
with the bellow contentsRun child pipeline: rules: - if: $CI_COMMIT_TAG when: never - when: always trigger: include: .gitlab-ci-child.yml strategy: depend
-
Create a
.gitlab-ci-child.yml
with the below contentsExpose from child pipeline: rules: - if: $CI_MERGE_REQUEST_ID when: always script: echo $CI_MERGE_REQUEST_ID | tee expose_as.txt artifacts: expose_as: 'exposed artifact from child pipeline' paths: ['expose_as.txt']
-
Make a change to the readme of your project in the GitLab UI, make a new branch, and start and submit an MR. (The initial build (which can be ignored) will fail due to the downstream pipeline not being able to be created as it is looking for an MR but the MR build will pass.)
-
Go to the MR and look for the links to
View Exposed Artifact
Example Project
https://gitlab.com/ehenley/expose_as-issue
What is the current bug behavior?
When using the artifacts:expose_as
feature in a child pipeline, the artifacts are not exposed in the MR.
What is the expected correct behavior?
When using the artifacts:expose_as
feature in a child pipeline, the artifacts are exposed in the MR.
(this is a screenshot of a working artifacts:expose_as
that is not part of a child pipeline.
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
e@gitlab:~$ sudo gitlab-rake gitlab:env:info [sudo] password for e: System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.26.2 Sidekiq Version:5.2.7 Go Version: unknown GitLab information Version: 13.0.5-ee Revision: 260c6231ed0 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.7 URL: http://192.168.1.37 HTTP Clone URL: http://192.168.1.37/some-group/some-project.git SSH Clone URL: git@192.168.1.37:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.2.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
e@gitlab:~$ sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.2.0 ? ... OK (13.2.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 1/2 ... yes 1/3 ... yes 5/4 ... yes 5/5 ... yes 5/6 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.22.0 ? ... yes (2.26.2) Git user has default SSH configuration? ... yes Active users: ... 1 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
I have been unable to determine what is causing this to fail. I did find open issues where child pipeline artifacts cannot be downloaded and Artifacts are not downloaded on child pipeline jobs that may be related as the jobs says that the artifacts are uploaded.