Qmpass CLI
qmpass-cli gate evaluate and signal push: options, exit codes and the result file.
qmpass-cli connects your CI/CD pipeline to Qmpass.ai. It evaluates a stage’s gate after a deploy, and reports what the pipeline built and deployed. The task guides are From your pipeline and Builds and deployments; this page is the reference.
Install
Section titled “Install”pipx install qmpass-cliNeeds Python 3.10 or newer. Use pipx (or pipx run) so the CLI has its own environment, and pin the version in pipelines, for example qmpass-cli==0.3.0, so you upgrade on your own schedule.
Authentication
Section titled “Authentication”| Variable | |
|---|---|
QMPASS_TOKEN |
A project API token with write access, from Project settings › Qmpass.ai › Project Settings › API tokens. Keep it in your CI secrets. The token belongs to one project, so nothing else is needed. |
QMPASS_URL |
Defaults to https://api.qmpass.ai; leave it unset. --url does the same. |
Project API tokens need API access, on Pro and Enterprise. The CLI never needs an agent token.
qmpass-cli --version prints the installed version.
gate evaluate
Section titled “gate evaluate”Starts an evaluation of a stage’s gate and waits for its automated checks. Manual checks stay open in Qmpass.ai for your testers; the pipeline never waits for them.
qmpass-cli gate evaluate --release 10023 --stage PST-02Name the gate one of two ways:
--gate PGT-0007: the gate’s ref, at the end of the gate page’s breadcrumb.--release 10023 --stage PST-02: the release id and the stage’s ref.
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, which must be online. |
--agent-variant rpa |
With auto: the agent image with the RPA add-on, for Salesforce, Excel, PDF or email runbooks. |
|
--agent-image |
the image this CLI was tested with | Another agent image. Also QMPASS_AGENT_IMAGE. |
--timeout |
45m |
Stop waiting and cancel the evaluation. |
--no-wait |
Start the evaluation and exit 0. Named agents only. |
|
--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 page. |
--pipeline-name, --build-number |
from the CI environment | Used for the default name. |
--idempotency-key |
the CI run id | Same key, same evaluation, so re-running the job doesn’t start a second one. |
--json-file |
qmpass-evaluation.json |
Where to write the final status. '' for none. |
Build details are read from GitHub Actions, Bitbucket Pipelines, GitLab CI, Jenkins and Azure Pipelines.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
The automated checks passed. Manual checks may still be open in Qmpass.ai. |
1 |
An automated check failed, was blocked or couldn’t run. |
3 |
Setup or infrastructure: the token, gate not found, agent offline or not started, Docker missing, timeout, or the evaluation was abandoned. |
The gate is advisory: if a failed check shouldn’t fail the job, let the step fail (continue-on-error or allow_failure).
Output
Section titled “Output”The CLI prints progress and a summary with the failed checks and a link to the evaluation. It writes the final status to qmpass-evaluation.json, including the evaluation, its state and the link. On GitHub Actions it also writes the job summary and the step outputs evaluation, state, outcome and url.
signal push
Section titled “signal push”Reports a build or a deployment, so the release decision shows failed builds and deployments and a new build on a stage after its sign-off.
qmpass-cli signal push build --component web --status successqmpass-cli signal push deployment --environment QA --stage PST-01 --status successRun it in a step that runs whether the build or deploy passed or failed.
| Option | Applies to | Default | |
|---|---|---|---|
--status |
both | required | Build: running, passed or failed. Deployment: started, succeeded, failed or rolled_back. Your CI’s words work too (success, failure, cancelled, GitHub’s ${{ job.status }}), or from-exit-code (Bitbucket’s BITBUCKET_EXIT_CODE, or QMPASS_EXIT_CODE). |
--component |
build | the pipeline name | What was built, such as web or api. Each component and branch is tracked on its own. |
--environment |
deployment | required | Where it was deployed, such as QA, Staging or Production. |
--stage |
deployment | The release stage this environment feeds, such as PST-01, so a new build after the stage’s sign-off is flagged. |
|
--environment-type |
deployment | development, testing, staging or production. |
|
--release |
both | Pin the push to one release by its id: 10035, sprint-42 or epic-10051. |
|
--issues |
both | auto |
auto reads issue keys from the commits since the previous push, none sends none, or list keys: SAM-1,SAM-2. |
--version, --commit, --branch, --build-url |
both | from the CI environment | Shown in Qmpass.ai. Outside CI, the commit is the current git HEAD. |
--pipeline-name, --build-number |
both | from the CI environment | |
--strict |
both | Fail the step when Qmpass.ai can’t be reached. |
Without --release, Qmpass.ai matches each push to releases by the issue keys in its commits, so check out with full history (fetch-depth: 0 on GitHub, GIT_DEPTH: 0 on GitLab, clone: depth: full on Bitbucket).
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Pushed. Also when Qmpass.ai can’t be reached: the CLI warns and your deploy carries on, unless you add --strict. |
3 |
Qmpass.ai refused the push: a bad token, an unknown release or stage, or an invalid status. |