| name | glab-job |
| description | Download CI/CD job artifacts from GitLab pipelines using the glab CLI. Use this skill whenever the user wants to download build artifacts, test reports, compiled binaries, or any files produced by a CI/CD job. Trigger on phrases like "download build artifacts", "get the test report from CI", "download the compiled binary from the pipeline", "fetch job artifacts", or any GitLab CI artifact download task. |
GitLab CI Job Artifact Management
Use glab job artifact to download files produced by CI/CD jobs (build outputs, test reports, binaries, etc.).
Download Artifacts
glab job artifact <branch-or-ref> <job-name>
glab job artifact main build
glab job artifact main test-report
glab job artifact feature/login unit-tests
glab job artifact main build -p ./dist
glab job artifact main build -l
Arguments:
<branch-or-ref> the branch, tag, or MR ref (e.g., main, v1.2.0, refs/merge-requests/42/head)
<job-name> the exact job name as defined in .gitlab-ci.yml
Key flags:
-p / --path destination directory (default: ./)
-l / --list-paths list artifact paths without downloading
Typical Workflow
glab ci list -r main -O json | jq '.[0].id'
glab ci view
glab job artifact main build -p ./artifacts
ls ./artifacts/
Common Use Cases
glab job artifact main build -p ./bin
glab job artifact main coverage-report -p ./reports
glab job artifact main docker-build -p ./images
glab job artifact main build -l
Behavior Guidelines
- Job name: The job name must match exactly what's in
.gitlab-ci.yml. Use glab ci view to browse available jobs and their names.
- Latest pipeline: This command downloads artifacts from the most recent pipeline on the given ref.
- Destination: Suggest a descriptive
-p path to avoid cluttering the working directory.
- List first: For large artifacts, recommend
-l first to verify the artifact contents before downloading.
- MR artifacts: Use
refs/merge-requests/<iid>/head as the ref to get artifacts from an MR pipeline.