GitLab CI/CD artifacts:reports Wiring Prompt
Wire the structured artifacts:reports types (junit, codequality, sast, dotenv, coverage_report, accessibility) so MR widgets, the test tab, and downstream jobs all light up correctly.
- Target user
- Engineers who get green pipelines but empty MR report widgets
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a GitLab CI specialist who makes merge-request widgets actually populate — test results, code quality deltas, and coverage — instead of the dreaded "no changes" placeholder.
I will provide:
- My jobs that produce reports (test, lint, security)
- The raw output each tool emits (or can emit) and its format
- What the MR widget currently shows (usually nothing)
Your job:
1. **Enumerate the report types** I should use and the exact format each expects: `junit` (JUnit XML), `coverage_report` (Cobertura/JaCoCo + `coverage_format`), `codequality` (Code Climate JSON), `sast`/`dependency_scanning` (GitLab security JSON), `dotenv`, `accessibility`. Note which require an Ultimate tier.
2. **Fix the producer step** for each — the CLI flags or adapters needed to emit the right format (e.g. pytest `--junitxml`, jest `jest-junit`, golangci-lint Code Climate output, `coverage xml` for Cobertura).
3. **Wire the artifacts block** correctly: `artifacts:reports:junit` must point at the file, and crucially also list the same path under `artifacts:paths` only when you want to browse it — explain when reports are NOT browsable.
4. **Coverage** — show the `coverage:` regex on the job (not the report) that scrapes the percentage for the badge/MR, and how it differs from `coverage_report` (visual diff). Give a working regex for my tool.
5. **dotenv pattern** — emit `build.env` and consume vars in downstream jobs via `needs:[{job, artifacts:true}]`; warn about the size/variable-count limits and that dotenv values are masked-unaware.
6. **MR widget reality check** — explain why widgets only diff against the target branch's latest pipeline, so the base branch must also have produced the report.
7. **Validate** — for each report type, the file should appear under the pipeline's "Tests"/"Code Quality" tabs and the MR widget. Give me a checklist and one `glab` / API call to confirm the report was ingested.
Output: (a) corrected job snippets per report type, (b) the coverage regex, (c) the dotenv producer/consumer pair, (d) a troubleshooting table mapping "widget empty" symptoms to root causes.
Bias toward: structured report types over raw artifact files, base-branch parity, and explicit format adapters.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
GitLab CI/CD Publish to the Package Registry (npm, Maven, generic) Prompt
Design .gitlab-ci.yml jobs that build and publish versioned artifacts to the project or group Package Registry using CI_JOB_TOKEN auth, with proper version gating, immutability, and consumer install config.
-
GitLab CI/CD Cross-Pipeline needs:pipeline Artifacts Prompt
Consume artifacts and job results from a separate upstream pipeline using needs:pipeline:job and needs:project, so downstream and multi-project pipelines build on real outputs instead of rebuilding.
-
GitLab CI/CD Artifact Expiry & Storage Governance Prompt
Audit and tune GitLab job artifact retention — expire_in policies, keep-latest rules, artifact size limits, and storage cost controls — to stop runaway artifact storage growth.
-
GitLab CI/CD Downstream dotenv Variable Passing Prompt
Pass computed values (image tag, version, environment URL) from an upstream job into a downstream/child pipeline using dotenv artifacts and trigger inheritance, instead of fragile re-computation or hardcoding.
More GitLab CI/CD prompts & error guides
Browse every GitLab CI/CD prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.