artifacts – name

By default, any uploaded files will be stored in a .zip archive titled artifacts.zip. You can use the name parameter to change the default filename (it will still end with .zip), as demonstrated in the following code:

package:  artifacts:    name: cool_project_name

In the preceding example, every time this job is completed, a zipped file called cool_project_name.zip will be uploaded to GitLab and made available for download in the web UI. However, this is not the limit of the naming parameter. You can use built-in GitLab variables such as CI_JOB_NAME (the name of the currently running GitLab CI job) or CI_COMMIT_REF_NAME (the name of the branch/tag) to create dynamically named artifacts like in this example:

package: artifacts: ...

Get GitLab Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.