Kiwi for TeamCity
Report check results from TeamCity 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 TeamCity secure value by generating a token for it in the project settings, and add report-kiwi-check.sh from the setup guide to your repository.
This .teamcity/settings.kts runs your tests, then reports the tests-pass check as pass or fail:
import jetbrains.buildServer.configs.kotlin.*
import jetbrains.buildServer.configs.kotlin.buildSteps.script
version = "2025.11"
project {
buildType {
id("Kiwi")
name = "Kiwi"
vcs {
root(DslContext.settingsRoot)
}
params {
text("env.KIWI_RUN_ID", "", label = "Kiwi run ID", display = ParameterDisplay.PROMPT, allowEmpty = false)
password("env.KIWI_CHECKER_KEY", "credentialsJSON:<token>")
}
steps {
script {
scriptContent = "npm ci && npm test"
}
script {
executionMode = BuildStep.ExecutionMode.RUN_ONLY_ON_FAILURE
scriptContent = "./report-kiwi-check.sh tests-pass fail '%env.BUILD_URL%'"
}
script {
executionMode = BuildStep.ExecutionMode.RUN_ON_SUCCESS
scriptContent = "./report-kiwi-check.sh tests-pass pass '%env.BUILD_URL%'"
}
}
}
}Put the generated token in place of <token>, then run the build and enter the Kiwi run ID when TeamCity asks for it.
Run it on an agent that has curl, jq and uuidgen.
Replace tests-pass with the check ID from your plan.