Kiwi for Buildkite
Report check results from Buildkite 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 Buildkite secret named KIWI_CHECKER_KEY and add report-kiwi-check.sh from the setup guide to your repository.
This .buildkite/pipeline.yml runs your tests, then reports the tests-pass check as pass or fail:
steps:
- label: Test
key: test
command: npm ci && npm test
- label: Report to Kiwi
depends_on:
- step: test
allow_failure: true
secrets:
- KIWI_CHECKER_KEY
command: |
if [ "$(buildkite-agent step get outcome --step test)" = passed ]; then status=pass; else status=fail; fi
./report-kiwi-check.sh tests-pass "$$status" "$$BUILDKITE_BUILD_URL"Start the build with the Kiwi run ID in the KIWI_RUN_ID environment variable, and run the report step on an agent that has curl, jq and uuidgen.
Replace tests-pass with the check ID from your plan.