Skip to main content
@qawolf/ci-sdk 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. On GitHub Actions, the GitHub Actions page does the same with two actions and no script.

Set it up from your agent

Ask your coding agent, connected to the QA Wolf MCP and open in the repository that deploys your application:
It reads your pipeline, shows you the plan, and creates the loop. See Set up with your agent. The rest of this page is the same setup by hand.

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.
  • @qawolf/ci-sdk 3.6.0 or later. Earlier versions of deployment.waitForVerdict fail before a run finishes, or wait until timeout on a run that needs a person.

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.name is 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 loop targets.
  • deployTarget is the URL the deploy serves and the address the flows run against.
  • GIT_COMMIT and GIT_BRANCH are 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 uses BUILD_TAG. On a CI system it does not recognize, compose providerDeploymentId yourself from a value that changes on every re-run.
  • Drop the waitForVerdict call 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 loop 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. Exit 0.
  • not-tested — no loop matched the deployment, or a loop matched and created no run. The result says which, per loop. The script exits 0; 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 exits 3, so the stage can be marked as skipped rather than failed.
  • needs-review — every run finished, and its failures wait for a person to answer QA Wolf’s questions on the run page. There is no verdict yet, and it is not a pass. The script exits 1, and the log carries the run URLs. Once someone answers, the run settles to passed or failed.
  • failed, run-canceled, timed-out and the transport outcomes — exit 1. The log carries the run URLs.
The full list of outcomes and the options that bound the wait are in the SDK reference.

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:
Send environment.ephemeral: true for every preview deploy. A report that omits it is accepted and creates a permanent environment, one per pull request, that is never torn down.
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.

Send what changed

A Smart Smoke Suite on a deploy with no pull request reads what the deploy changed. QA Wolf reads what changed through its GitHub or GitLab integration. On GitHub it reads merged pull requests, but not commits pushed straight to a branch. It reads nothing of repositories the integration doesn’t cover. Send those in changes, built from your git history with deployment.collectDeployChanges. QA Wolf combines them with what it reads from your code host. See Sending changes from your CI.

Create a loop

Reporting a deploy starts nothing on its own. Create a loop that starts on deploys, with conditions that match the deployments you now report. See Loops.
Last modified on December 3, 2026