@qawolf/ci-sdk reports the deploy and, if you want the pipeline to block on the result, waits for QA Wolf’s verdict. It calls the same deployment.reportStatus route as the Webhook page, with typed inputs and a result object instead of a raw HTTP response.
Pick this path for a CI system QA Wolf’s code host integrations do not cover, such as Jenkins, Buildkite, Bitbucket Pipelines, TeamCity or Azure Pipelines, when the deploying repository is not connected, or when the deploy happens somewhere your code host never sees. A pipeline that cannot run Node.js uses the Webhook instead.
Requirements
- An API key, created under Workspace Settings → API Keys. A workspace, organization or user key all work.
- The workspace id, shown on the same page.
- Node.js 24.14.1 or later, below 25, on the agent that runs the step.
Add the notify script
1
Store the API key and workspace id
Store the API key as a secret named
QAWOLF_API_KEY in your CI system, and the workspace id as QAWOLF_WORKSPACE_ID.2
Add the script to the deploying repository
Create
.ci/notifyQaWolf.mjs.environment.nameis the QA Wolf environment the deploy belongs to. Send the environment’s name or one of its aliases; a name nothing matches creates a new environment that no trigger targets.deployTargetis the URL the deploy serves and the address the flows run against.GIT_COMMITandGIT_BRANCHare the variables Jenkins sets through the Git plugin. Replace them with the ones your CI system provides.detectProviderDeploymentId()reads the CI system’s own variables, so a re-run of the job reports a new deployment rather than updating one that already ran. On Jenkins it usesBUILD_TAG. On a CI system it does not recognize, composeproviderDeploymentIdyourself from a value that changes on every re-run.- Drop the
waitForVerdictcall when the pipeline should not block on the result. Reporting alone is what starts the run.
3
Run the script after the deploy is live
Add a step that runs once the deployment is healthy.On Jenkins, as a stage in a declarative
Jenkinsfile:credentials('qawolf-api-key') reads a Secret text credential with that id. Give the stage a timeout longer than the script’s own timeout, so the script ends with a verdict and a run URL instead of the stage being killed.4
Verify the integration
Run the pipeline with a new deployment. The step logs the deployment’s URL, and the deployment appears on the workspace’s deployments page. Once a trigger matches it, a run appears under the environment, and the step waits for the run.
What the step exits with
deployment.waitForVerdict never throws. The script above maps its outcomes to exit codes:
passed— every run passed. Exit0.not-tested— no trigger matched the deployment, or a trigger matched and created no run. The result says which, per trigger. The script exits0; change that when you expect a run on every deploy.superseded— a newer deploy to the same branch and environment replaced the run, and that deploy’s step carries the verdict. The script exits3, so the stage can be marked as skipped rather than failed.failed,run-canceled,timed-outand the transport outcomes — exit1. The log carries the run URLs.
Preview deploys
For a preview deploy per pull request, give each one its own environment name and URL, mark it ephemeral, and name the pull request:metadata.repository and metadata.pullRequestNumber link the deployment to its pull request only when a connected GitHub or GitLab integration covers that repository. See PR testing.
Create a trigger
Reporting a deploy starts nothing on its own. Create a deployment trigger whose conditions match the deployments you now report. See Triggers.Related
- SDK reference — every function, parameter and outcome.
- Troubleshooting — when the step reports but nothing runs.
- Deployments — how the environment name and preview flag resolve.