Skip to main content

Qmpass CLI

Run a Qmpass release gate evaluation from your CI/CD pipeline. The pipeline deploys a release candidate, qmpass-cli evaluates the stage's gate, and the job passes or fails on the gate's automated checks. Manual checks stay open in Qmpass for your testers — the pipeline never waits for them.

It also reports what the pipeline built and deployed (qmpass-cli signal push), so the release decision in Qmpass shows failed builds and deployments, and a new build on a stage after its sign-off.

Requirements

  • Python 3.10 or newer
  • A project API token with write access: Project settings → API tokens (Pro plan and up)
  • For --agent auto (the default): Docker on the runner. Otherwise, an agent your team runs (see "Which agent runs the checks" below).

Install

pipx install qmpass-cli

Use pipx (or pipx run) so the CLI gets its own environment and never clashes with your job's packages. Pin the version in pipelines (qmpass-cli==0.3.0) to upgrade on your schedule.

Run

export QMPASS_TOKEN=qmp_proj_…      # keep it in your CI secrets
qmpass-cli gate evaluate --release 10023 --stage PST-02

Name the gate by its ref (--gate PGT-0007, shown at the end of the gate page's breadcrumb) or by release id + stage ref (--release 10023 --stage PST-02, stage refs are in Project settings → Release stages). The evaluation tests the stage's App Address.

Option Default
--agent auto auto starts a temporary agent in Docker on the runner and removes it afterwards. Or the name of an agent your team runs (it must be online).
--timeout 45m Stop waiting and cancel the evaluation.
--no-wait Start and exit 0 (named agents only).
--name <pipeline> #<build number> Evaluation name in Qmpass.
--build-version, --commit, --branch, --build-url from the CI environment Shown on the Evaluation page.
--idempotency-key the CI run id Same key = same evaluation, so a re-run of the job doesn't start a second one.
--agent-image the release this CLI was tested with Another agent image (env QMPASS_AGENT_IMAGE).
--agent-variant rpa The agent image with the RPA framework (Salesforce, Excel, PDF, Email, …).

QMPASS_URL defaults to https://api.qmpass.ai.

Which agent runs the checks

The CLI only needs the project API token (QMPASS_TOKEN). It never needs an agent token.

--agent auto (default) — a temporary agent on the runner

qmpass-cli gate evaluate --release 10023 --stage PST-02
  1. The CLI starts the evaluation; Qmpass creates a temporary agent for this evaluation only.
  2. The CLI runs the Qmpass test agent image with docker run on the runner.
  3. The agent connects to Qmpass, runs the gate's automated checks and reports the results.
  4. When the checks are done, Qmpass removes the agent and its token, and the container stops.

Needs Docker on the runner. The agent runs on the runner, so it reaches whatever the runner reaches — preview deploys, or internal URLs on self-hosted runners. Use --agent-variant rpa when the gate's runbooks use the RPA framework.

--agent "<name>" — an agent your team runs

qmpass-cli gate evaluate --release 10023 --stage PST-02 --agent "QA runner"

The checks run on an agent you installed and connected beforehand (pipx install qmpass-test-agent, then qmpass-agent run with that agent's own token from Project settings → Agents). It must be online when the evaluation starts, otherwise the CLI stops with exit code 3. Use it when:

  • the runner has no Docker;
  • the app under test is reachable only from a particular machine (private network, VPN);
  • the checks need a desktop or Windows machine.

With a named agent, --no-wait starts the evaluation and exits straight away; follow it in Qmpass.

Either way the CLI waits only for the automated checks — manual checks stay open in Qmpass for your testers.

Build details are read from GitHub Actions, Bitbucket Pipelines, GitLab CI, Jenkins and Azure Pipelines.

Exit codes

Code Meaning
0 The automated checks passed. Manual checks may still be open in Qmpass.
1 An automated check failed, was blocked or couldn't run.
3 Setup or infrastructure: token, gate not found, agent offline or not started, Docker missing, timeout, evaluation abandoned.

Qmpass is an advisory gate: if you don't want a failed check to fail the job, allow the step to fail (continue-on-error / allow_failure).

The CLI prints progress and a summary with the failed checks and a link to the evaluation, and writes qmpass-evaluation.json. On GitHub Actions it also writes the job summary and the step outputs evaluation, state, outcome and url.

In your pipeline

Two commands in any CI: install the CLI, then evaluate. Keep QMPASS_TOKEN in your CI's secrets — the token belongs to one project, so nothing else is needed. --agent auto (the default) needs Docker on the runner.

GitHub Actions (ubuntu-* runners have pipx and Docker):

- 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, url.

Bitbucket Pipelines (secured repository variable QMPASS_TOKEN; the docker service runs the temporary agent):

- 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-02

GitLab CI (masked CI/CD variable QMPASS_TOKEN; Docker-in-Docker for the agent):

qmpass-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

Azure DevOps (secret variable QMPASS_TOKEN — secrets must be mapped into env; Microsoft-hosted ubuntu-latest has pipx and Docker):

- script: |
    pipx install qmpass-cli==0.3.0
    qmpass-cli gate evaluate --release 10023 --stage PST-02
  displayName: Qmpass gate
  env:
    QMPASS_TOKEN: $(QMPASS_TOKEN)

Jenkins (declarative; a secret-text credential qmpass-token; the agent needs Python 3.10+, pipx and Docker):

stage('Qmpass gate') {
  environment {
    QMPASS_TOKEN = credentials('qmpass-token')
  }
  steps {
    sh 'pipx install qmpass-cli==0.3.0'
    sh 'qmpass-cli gate evaluate --release 10023 --stage PST-02'
  }
}

No Docker on the runner? Run the Qmpass agent on a machine your team controls and add --agent <name>.

The temporary agent runs on your runner, so it reaches whatever the runner reaches (preview deploys, internal URLs on self-hosted runners). Its token is issued for this evaluation only and is removed when the evaluation is done with it.

Report builds and deployments

Tell Qmpass what the pipeline built and where it deployed it. In Qmpass it shows on the release as Builds and deployments: a failed build or deployment is a release risk (or blocks Mark released, if your project chooses so), and a new build on a stage after its sign-off is flagged.

qmpass-cli signal push build --component web --status success --version 1.4.0-rc.3
qmpass-cli signal push deployment --environment QA --stage PST-01 --status success --version 1.4.0-rc.3

Which release? You don't name it. Qmpass matches each push by the issue keys in the commits since the previous push (the CLI reads them with git log), the same link Jira uses for branches, commits and pull requests. A release joins the build or environment when it's next opened in Qmpass and its stories match — fix versions, sprints and epics alike. Check out with history (fetch-depth: 0 on GitHub) so the CLI can read the commits. To pin a push instead, add --release <id> — the id at the end of the release's breadcrumb in Qmpass (10035, sprint-42, epic-10051).

Option Default
--status required running · passed · failed for a build; started · succeeded · failed · rolled_back for a deployment. Your CI's words work too (success, failure, cancelled, GitHub's ${{ job.status }}), or from-exit-code (Bitbucket BITBUCKET_EXIT_CODE, or QMPASS_EXIT_CODE).
--component (build) the pipeline name What was built, e.g. web, api. Each component + branch is tracked on its own.
--environment (deployment) required Your environment's name: QA, Staging, Production.
--stage (deployment) The release stage this environment feeds (PST-01): Qmpass then flags a new build there after the stage's sign-off.
--release Pin to this release instead of matching by issue keys.
--issues auto auto (git log since the previous push), none, or keys: SAM-1,SAM-2.
--version, --commit, --branch, --build-url from the CI environment Shown in Qmpass.
--strict Fail the step when Qmpass can't be reached.

Exit codes: 0 pushed — and also when Qmpass can't be reached (a warning; the deploy goes on unless --strict), 3 Qmpass refused the push (bad token, unknown release or stage, invalid status).

GitHub Actions — report the job's result even when it fails:

- uses: actions/checkout@v4
  with: { fetch-depth: 0 }
- run: ./deploy.sh qa
- name: Qmpass deployment
  if: always()
  run: |
    pipx install qmpass-cli==0.3.0
    qmpass-cli signal push deployment --environment QA --stage PST-01 --status ${{ job.status }}
  env:
    QMPASS_TOKEN: ${{ secrets.QMPASS_TOKEN }}

Bitbucket Pipelines — an after-script runs whether the step passed or failed:

- step:
    name: Deploy QA
    image: python:3.12
    clone: { depth: full }
    script:
      - ./deploy.sh qa
    after-script:
      - python3 -m pip install pipx
      - python3 -m pipx run --spec qmpass-cli==0.3.0 qmpass-cli signal push deployment --environment QA --stage PST-01 --status from-exit-code

GitLab CI (GIT_DEPTH: 0 for full history; after_script runs after a failed deploy too and sees its CI_JOB_STATUS):

deploy-qa:
  image: python:3.12
  variables: { GIT_DEPTH: "0" }
  script:
    - ./deploy.sh qa
  after_script:
    - python3 -m pip install pipx
    - python3 -m pipx run --spec qmpass-cli==0.3.0 qmpass-cli signal push deployment --environment QA --stage PST-01 --status "$CI_JOB_STATUS"

Azure DevOps and Jenkins work the same way: install the CLI, then qmpass-cli signal push … in a step that runs on success and failure (condition: always() / post { always { … } }), passing the result as --status.

Metadata

Release files for qmpass-cli 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qmpass-cli 0.3.0
File Size Uploaded Provenance Actions
qmpass_cli-0.3.0.tar.gz 29.8 kB Without provenance Details for qmpass_cli-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qmpass-cli 0.3.0
File Interpreter ABI Platform Actions
qmpass_cli-0.3.0-py3-none-any.whl Python 3 none any Details for qmpass_cli-0.3.0-py3-none-any.whl

Total release size: 52.4 kB

Release files / qmpass_cli-0.3.0.tar.gz

Download URL qmpass_cli-0.3.0.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
04103fe75ade2a2ab93d799f4b69c6bee0f01ed8304ca2f3d5b65c3013ee8f10
BLAKE2b-256 checksum
How to use checksums
9964592e76ba6fe76e870d557aae1c9cb463c2bc9ce28a150848359ebcfe8b8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.10

Release files / qmpass_cli-0.3.0-py3-none-any.whl

Download URL qmpass_cli-0.3.0-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5aa83ee37468e7abad5fc601a1b4ca8a475cc8b6502e952da350162bd86ac82
BLAKE2b-256 checksum
How to use checksums
bdc829c241686098899b6f1234aaf3aef4c42f2df86dee4720ee82b41561f453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.10

Security for qmpass-cli 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page