The GitLab CI/CD component version of the DiffCI change impact Action. It analyses each merge request and default-branch push and writes a summary saying which tests the change affects and why (or that the full suite is needed and why), plus the full JSON report. It is observation only: it runs no tests, skips or cancels no jobs, does not comment on merge requests, does not change the checkout, and sends nothing anywhere.
include:
- component: $CI_SERVER_FQDN/diffci/diffci/observe@0.3.60Keep every existing test, build, lint and security job unchanged. The observer adds one job beside them.
- Runs on merge request pipelines and on pushes to the default branch, where a commit range exists.
- Starts at once (
needs: []) and usesallow_failure: true, so a DiffCI problem never fails the pipeline. - Clones with
GIT_DEPTH: "0", because GitLab's default 20-commit clone can drop a merge request's base commit. - Installs the pinned CLI outside the checkout with
--ignore-scripts, and writes the report outside the checkout while observing. - Uploads
.diffci/diffci-summary.md(what the change affects, and why) and.diffci/diffci-observation.jsonas artifacts, linked from the merge request as "DiffCI change impact", and exposesDIFFCI_STATUS(OBSERVED,REFUSEDorERROR) to jobs thatneedsit.
In a merged-results pipeline the observer diffs the source branch head, not the merge commit GitLab creates.
| Input | Default | Meaning |
|---|---|---|
stage |
test |
Stage of the observer job |
job-name |
diffci-observe |
Job name; redefine the job to override rules or allow_failure |
image |
node:22 |
Needs Node 22+, git and bash. Alpine images lack bash. Pin by digest in production |
cli-version |
0.3.60 |
Exact published @diffci.com/diffci version |
redact-paths |
false |
Replace every path in the report with a stable 12-character digest |
artifact-expire-in |
7 days |
How long the report artifact is kept |
- Sending reports to DiffCI Cloud. Cloud accepts GitHub repositories only today, so this component sends nothing.
- Reading
.gitlab-ci.ymlto plan which jobs a change affects. Changes to GitLab pipeline files, and to files theyinclude, already make the observer report a full run.
Source: DiffCI/core, MIT.