Skip to main content
When your pipeline runs Node.js, @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.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 trigger 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 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. Exit 0.
  • not-tested — no trigger matched the deployment, or a trigger matched and created no run. The result says which, per trigger. 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.
  • 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.

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.
Last modified on October 5, 2026