Hi, I am encountering an issue with depending on artifacts from another project. Firstly I ran into issues at work on our selfhosted deployment on version: 14.6.2-ee. Eventually I figured maybe this is some issue with our setup/version, although I did not have any direct reasoning for this, and moved towards created a somewhat minimal setup on Gitlab.com. The setup can be found here and here – “ci_test_2” depends on “ci_test_2” --. And luck has it I cannot get it to work here either…
When I use the “needs:project” in my pipeline to retrieve and use artifacts from another project’s pipeline, it be triggered from the other with “trigger”, or ran directly after a successful execution the dependency pipeline done manually, I get an error stating: “This job could not start because it could not retrieve the needed artifacts.” or “missing dependency failure”.
Below are both .gitlab-ci.yml’s included…
ci_test_1:
job_that_creates_some_artifact:
script:
- echo "Something cool" > this_makes_me_sad.cry
artifacts:
paths:
- this_makes_me_sad.cry
expire_in: 2 mos
.job_that_triggers_external_pipeline:
needs:
- job_that_creates_some_artifact
trigger:
project: n1ouse/ci_test_2
branch: main
strategy: depend
ci_test_2
job_that_depends_on_other_pipeline_in_other_project:
needs:
#- project: $CI_PROJECT_PATH
# job: $DEPENDENCY_JOB_NAME
# ref: $ARTIFACTS_DOWNLOAD_REF
- project: n1ouse/ci_test_1
job: job_that_creates_some_artifact
ref: main
artifacts: false
script:
- cat this_makes_me_sad.cry
I have spent quite some time googling and read all the documentation I could find. And AFAIK this should work… I did find a thread somewhere mentioning I need premium versions for this to work which I do not have. Although this is, AFAIK, never mentioned anywhere in documentation…
Documentation for using triggers across projects.
Documentation for depending across projects.
P.S.
I am also unsure what exactly the use of the “dependencies” keywor is, can someone enlighten me why this keyword is relevant and not “needs:artifacts”? Is this just legacy?