N
N
Nikolay Baranenko2022-01-18 14:10:23
Continuous Delivery
Nikolay Baranenko, 2022-01-18 14:10:23

GitLab Why does an artifact download from one branch of the same Repo, but not from another?

To implement a specific task in the GitlabCI Pipeline , you
need to download the artifact from the child job

curl -L --header "PRIVATE-TOKEN:  YOUR-TOKEN" "https://gitlab.com/api/v4/projects/11111/jobs/artifacts/cicd/download?job=integration_test" --output artifacts.zip

curl -L --header "PRIVATE-TOKEN:  YOUR-TOKEN" "https://gitlab.com/api/v4/projects/11111/jobs/artifacts/dev/download?job=integration_test" --output artifacts.zip


in the first case it is downloaded normally, in the second it is not downloaded,
although judging by the WebUI everything is in place

. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Baranenko, 2022-01-31
@drno-reg

is not downloadable because there was not a single completed pipeline in the dev branch
and this means that it is impossible to use the API method
GET /projects/:id/jobs/artifacts/:ref_name/downloa...
BUT
there is another method that I described in the
Gitlab CI article "Smart" Pipeline: parents and children
decide whether or not to put their vote, but each + helps to get out of the minus)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question