[Job artifacts](https://docs.gitlab.com/ci/jobs/job_artifacts/) --- # Creation Expose via ``` artifacts: path: - blaat.txt ``` > path is relative to repository where job was created Wildcards can be used: `*` in the path. Expiry can be set, ie: `expire_in: 1 week`. `artifacts: name` to explicitly name the artifact. # Using Artifacts are downloaded into the job's working directory by default. If one specifies either: `dependencies` or `needs` only artifacts of jobs of those are downloaded. `dependencies` only specifies which artifacts to download whereas `needs` also defined the relationship between jobs. To prevent downloading dependencies at all just set `dependencies: []`. Example: ``` dependencies: - build-gobs - build-goba ``` They can also be downloaded over http. Using the job token is allowed. ```plaintext https://gitlab.com/api/v4/projects//jobs/artifacts/main/download?job=build ``` ``` build_submodule: stage: test script: - apt update && apt install -y unzip - curl --location --output artifacts.zip "https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/main/download?job=test&job_token=$CI_JOB_TOKEN" - unzip artifacts.zip ```