DEV Community

Cover image for Download artifacts from gitlab

Posted on

Download artifacts from gitlab

debugging the download function from gitlab for artifacts can be quite cumbersome as you have to create them by yourself and you have no easy autogenerated link you can simple copy and paste.

according the docs for getting the latest zip file of an artifact you have to use a link like the following:

to get a single file out of the artifact you have to (in this case yaml-convert.phar) use a link like:

be careful you have to use the exact job name, first i had one stage build but two jobs for it tag and master so my job names were build:master and build:tag which resulted in a 404 if you use

i have not tried to use build:master as job name for the download url, i renamed my jobs in the .gitlab-ci.yml to build-master and changed the url to which worked without 404.

after a refactoring of the .gitlab-ci.yml file i ended up removing the 2nd job and handling everything in one build job to have nicer urls:

# zip file download

# zip file download from tag

# single file download


Discussion (0)