Hi,
I have an upstream private project where I have:
in .gitlab-ci.yml of the upstream project:
my_upstream_job:
stage: build
script:
...
- tar cvf artifact.tar public/*
artifacts:
paths:
- artifact.tar
and in the downstream one:
downstream_job:
stage: deploy
script:
- curl --location --output artifacts.tar https://gitlab.com/api/v4/projects/<my_upstream_project_id>/jobs/artifacts/master/download?job=my_upstream_job&job_token=$CI_JOB_TOKEN
If I look into artifacts.tar, I have:
$ cat artifacts.tar
{"message":"404 Project Not Found"}
Typing part of the url (up to the project id) into the browser where I am logged into Gitlab, return correct json information but using another browser not logged, I get the exact same message.
So I guess I am missing or using bad credential.
I have based my sought on this page:
https://docs.gitlab.com/ee/api/jobs.html#get-job-artifacts
If you have suggestion or better the solution ! This will save the remaining hair from my head
Regards,
Fabien