Kiwi for GitLab CI/CD
Report check results from GitLab CI/CD to a run's Verify step with a checker key.
- Posts named check results over HTTP with a checker key. The key can report only the checks you choose in one project.
- Checks reserved for CI accept results only from a checker key.
- Records each result against the candidate under review. A pass counts toward Verify; a fail means the run needs rework.
- Records a retried report once.
- Kiwi does not start pipelines or read their logs. It records the results your pipeline sends.
Set up
Store your checker key as a masked CI/CD variable named KIWI_CHECKER_KEY and add report-kiwi-check.sh from the setup guide to your repository.
This .gitlab-ci.yml runs your tests, then reports the tests-pass check as pass or fail:
spec:
inputs:
kiwi_run_id:
description: Kiwi run ID
default: ''
---
variables:
KIWI_RUN_ID: $[[ inputs.kiwi_run_id ]]
stages: [test, report]
test:
stage: test
image: node:22
script:
- npm ci && npm test
.report-kiwi-check:
stage: report
image: ubuntu:24.04
before_script:
- apt-get update && apt-get install -y ca-certificates curl jq uuid-runtime
report-pass:
extends: .report-kiwi-check
rules:
- if: $KIWI_RUN_ID
when: on_success
script:
- ./report-kiwi-check.sh tests-pass pass "$CI_PIPELINE_URL"
report-fail:
extends: .report-kiwi-check
rules:
- if: $KIWI_RUN_ID
when: on_failure
script:
- ./report-kiwi-check.sh tests-pass fail "$CI_PIPELINE_URL"Run the pipeline with the Kiwi run ID as the kiwi_run_id input. The report jobs are skipped when the input is empty.
Replace tests-pass with the check ID from your plan.