@prodgator/report
v3.25.0
Published
Send CI job summaries, test results, attestations and artifacts to Prodgator, authenticated with the CI system's OIDC token
Readme
@prodgator/report
Shared report client for the Prodgator GitHub action, GitLab component and Bitbucket pipe. User docs: the Run reports guide.
Command line
prodgator-report runs in GitLab CI or Bitbucket Pipelines, reads the job's OIDC token, and sends a report to Prodgator. On GitHub Actions, use the prodgator/prodgator-action action instead.
Options can be set as a CLI flag, a PRODGATOR_-prefixed environment variable, or (only with --pipe) an unprefixed pipe variable. A flag wins over a pipe variable, which wins over the PRODGATOR_ variable, which wins over the default.
On Azure Pipelines, a script step reads PRODGATOR_URL and PRODGATOR_ALLOW_CUSTOM_URL from pipeline variables, so do not make them settable at queue time. The Marketplace task ignores them and takes inputs only.
| Option | CLI flag | Env (GitLab, any shell) | Pipe variable |
|---|---|---|---|
| prodgatorUrl | --prodgator-url | PRODGATOR_URL | PRODGATOR_URL |
| audience | --audience | PRODGATOR_AUDIENCE | AUDIENCE |
| summary | --summary | PRODGATOR_SUMMARY | SUMMARY |
| summaryFile | --summary-file | PRODGATOR_SUMMARY_FILE | SUMMARY_FILE |
| name | --name | PRODGATOR_NAME | NAME |
| jobName | --job-name | PRODGATOR_JOB_NAME | (none: Bitbucket uses the step name) |
| matrix | --matrix | PRODGATOR_MATRIX | MATRIX |
| junit | --junit | PRODGATOR_JUNIT | JUNIT |
| artifacts | --artifacts | PRODGATOR_ARTIFACTS | ARTIFACTS |
| attestations | --attestations | PRODGATOR_ATTESTATIONS | ATTESTATIONS |
| redactVariables | --redact-variables | PRODGATOR_REDACT_VARIABLES | REDACT_VARIABLES |
| failOnError | --fail-on-error | PRODGATOR_FAIL_ON_ERROR | FAIL_ON_ERROR |
| gate | --gate | PRODGATOR_GATE | GATE |
| gateTimeoutMinutes | --gate-timeout | PRODGATOR_GATE_TIMEOUT | GATE_TIMEOUT |
| blame | --blame / --no-blame | PRODGATOR_BLAME | (none: set PRODGATOR_BLAME: 'false') |
| tokenVariable | --token-variable | PRODGATOR_TOKEN_VARIABLE | (none) |
GitLab CI example, reporting from its own short job:
unit-tests:
image: node:22
id_tokens:
PRODGATOR_ID_TOKEN:
aud: https://api.prodgator.io
script:
- npm ci && npm test
after_script:
- npx --yes @prodgator/report@1 --junit 'test-results/*.xml'