From your pipeline
Evaluate a stage's gate from your CI pipeline with the Qmpass CLI: after a deploy, the job passes or fails on the gate's automated checks.
Your pipeline deploys a release candidate, then asks Qmpass.ai to evaluate that stage’s gate. The automated checkpoints run, and the job passes or fails on their result. Manual checkpoints stay open in Qmpass.ai for your testers; the pipeline never waits for them.
The evaluation shows in Qmpass.ai like any other, with the build version, commit, branch and a link back to the pipeline run.
Before you start
Section titled “Before you start”- Your plan includes API access (Pro and Enterprise).
- A project API token with write access, from Project settings›Qmpass.ai›Project Settings›API tokens. A Jira Admin or Project Admin creates it. Keep it in your CI’s secrets as
QMPASS_TOKEN. - The gate is planned, and the checkpoints you want the pipeline to prove have published runbooks.
- Python 3.10 or newer on the runner, and Docker if the checks should run on a temporary agent (the default).
Run an evaluation from CI
Section titled “Run an evaluation from CI”- Qmpass.ai›Gates
Find the gate’s reference
Section titled “Find the gate’s reference”Name the gate in one of two ways:
- Its gate reference, like
PGT-0007, shown at the end of the gate page’s breadcrumb. - The release id plus the stage reference, like
--release 10023 --stage PST-02. Stage references are in Release Stages in Project settings; the release id is at the end of the release’s breadcrumb on Home.
The evaluation tests the stage’s App Address.
- Its gate reference, like
- Your pipeline
Add two commands after the deploy
Section titled “Add two commands after the deploy”Install the CLI with pipx, then evaluate:
Terminal window pipx install qmpass-cliqmpass-cli gate evaluate --release 10023 --stage PST-02Pin the CLI version in pipelines (for example
qmpass-cli==0.3.0) so you upgrade on your own schedule. The token belongs to one project, so nothing else is needed. - Your pipeline
Read the result
Section titled “Read the result”The job’s exit code says how the automated checks went:
Exit code Means 0The automated checks passed. Manual checkpoints may still be open in Qmpass.ai. 1An automated check failed, was blocked or couldn’t run. 3Setup or infrastructure: the token, a gate that wasn’t found, an agent that’s offline or didn’t start, Docker missing, a timeout or an abandoned evaluation. The gate is advisory. If a failed check shouldn’t fail the job, let the step fail without stopping the pipeline (
continue-on-errororallow_failure).You'll see a summary with the failed checks and a link to the evaluation, and a
qmpass-evaluation.jsonfile.
Which agent runs the checks
Section titled “Which agent runs the checks”A temporary agent (default, --agent auto). The CLI starts the Qmpass test agent image with Docker on the runner. Qmpass.ai creates an agent and a token for this evaluation only, and removes both when the checks are done. The agent reaches whatever the runner reaches, such as preview deploys or internal addresses on self-hosted runners.
An agent your team runs (--agent "QA runner"). Use one you installed and connected beforehand when the runner has no Docker, when the app is only reachable from a particular machine, or when the checks need a desktop or Windows machine. It must be online when the evaluation starts. With a named agent, --no-wait starts the evaluation and exits straight away. See Agents.
Use --agent-variant rpa when the gate’s runbooks automate Salesforce, Excel, PDF or email.
Useful options
Section titled “Useful options”| Option | Default | What it does |
|---|---|---|
--gate |
The gate reference, instead of --release and --stage. |
|
--agent |
auto |
A temporary agent, or the name of an agent your team runs. |
--timeout |
45m |
Stop waiting and cancel the evaluation. |
--name |
<pipeline> #<build number> |
The evaluation’s name in Qmpass.ai. |
--build-version, --commit, --branch, --build-url |
From the CI environment | Shown on the evaluation. |
--idempotency-key |
The CI run id | A re-run of the same job continues the same evaluation instead of starting a second one. |
Build details are read automatically on GitHub Actions, Bitbucket Pipelines, GitLab CI, Jenkins and Azure Pipelines. See Qmpass CLI for every option.
Examples
Section titled “Examples”- name: Qmpass gate run: | pipx install qmpass-cli==0.3.0 qmpass-cli gate evaluate --release 10023 --stage PST-02 --build-version "${{ github.ref_name }}" env: QMPASS_TOKEN: ${{ secrets.QMPASS_TOKEN }}On GitHub the CLI also writes the job summary and the step outputs evaluation, state, outcome and url.
- step: name: Qmpass gate image: python:3.12 services: [docker] script: - python3 -m pip install pipx - python3 -m pipx run --spec qmpass-cli==0.3.0 qmpass-cli gate evaluate --release 10023 --stage PST-02qmpass-gate: image: python:3.12 services: [docker:dind] variables: { DOCKER_HOST: "tcp://docker:2375" } script: - python3 -m pip install pipx - python3 -m pipx run --spec qmpass-cli==0.3.0 qmpass-cli gate evaluate --release 10023 --stage PST-02