Kiwi for Azure Pipelines
Report check results from Azure Pipelines 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 secret pipeline variable named KIWI_CHECKER_KEY and add report-kiwi-check.sh from the setup guide to your repository.
This azure-pipelines.yml runs your tests, then reports the tests-pass check as pass or fail:
trigger: none
pr: none
parameters:
- name: kiwiRunId
displayName: Kiwi run ID
type: string
pool:
vmImage: ubuntu-latest
steps:
- script: sudo apt-get update && sudo apt-get install -y uuid-runtime
- script: npm ci && npm test
- script: |
if [ "$AGENT_JOBSTATUS" = Succeeded ]; then status=pass; else status=fail; fi
./report-kiwi-check.sh tests-pass "$status" "$SYSTEM_TEAMFOUNDATIONCOLLECTIONURI$SYSTEM_TEAMPROJECT/_build/results?buildId=$BUILD_BUILDID"
condition: succeededOrFailed()
env:
KIWI_CHECKER_KEY: $(KIWI_CHECKER_KEY)
KIWI_RUN_ID: ${{ parameters.kiwiRunId }}Run the pipeline with the Kiwi run ID as the kiwiRunId parameter. Secret variables reach a script only through env.
Replace tests-pass with the check ID from your plan.