> For the complete documentation index, see [llms.txt](https://learning.contextqa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learning.contextqa.com/integrations-and-developer-tools/integrations/ci-cd-release-gates.md).

# CI/CD Release Gates

Connect ContextQA test plans to GitHub Actions, GitLab, Jenkins, Azure Pipelines, CircleCI, or Bitbucket with scoped tokens and verified release gates.

> **Documentation owner:** [Deep Barot](https://contextqa.com/academy/) · **Last updated:** November 11, 2026

## Quick answer

Open a test plan’s **CI / CD** tab, copy its plan ID, and follow **Open setup guide** for your CI provider. Store a scoped ContextQA token as `CONTEXTQA_TOKEN` in the provider’s secret store. Run the intended build, wait for a terminal test result, and verify that a deliberate test failure blocks the pipeline before relying on it as a release gate.

## Key takeaways

* Use the current CI / CD setup guide and exact plan ID.
* Keep tokens in CI secrets and give them execution/result permissions.
* Distinguish PR analysis status from a completed execution gate.

## Supported delivery workflows

The setup covers GitHub Actions, GitLab CI, Jenkins, Azure Pipelines, CircleCI, and Bitbucket Pipelines, with a CLI path for other CI systems. The same plan can be part of pull-request validation, post-deployment checks, or scheduled regression.

![Current CI / CD tab with plan ID, setup guide, token permissions, and environment/build overrides](https://4255556216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKlyaXxb76z3Dn47TrZkU%2Fuploads%2Fgit-blob-d7e27357f86b3d679d32e34cce8a808e30ff2bbc%2Fcicd-plan-token-permissions.jpg?alt=media)

## Before you configure the pipeline

Run the plan manually against a known build. Resolve login and data prerequisites and confirm that the runner can reach the application. Define how the pipeline identifies the candidate deployment, how long it waits, and which outcomes block delivery.

## Step 1: prepare the plan and credential

1. Open the intended test plan, then **CI / CD**.
2. Copy **Test plan ID** for the integration's `plan-id` input.
3. Have an authorized administrator create a token with **TEST\_PLAN\_EXECUTE** and **TEST\_PLAN\_RESULTS\_READ**. Add **TEST\_CASE\_RESULTS\_READ** for per-test reporting when needed.
4. Store the one-time token value in the CI provider's protected secret store as **CONTEXTQA\_TOKEN**.
5. Use a defined expiry and rotate the secret through your normal administration process.

Do not put a token in YAML, screenshots, ticket comments, or run artifacts. API clients using these tokens send them through the supported Bearer authentication mechanism; provider setup handles the exact request shape.

## Step 2: connect the provider

Open **Open setup guide** from the current product tab and use the instructions for your provider. Earlier interfaces can show generated provider configuration; review it against the current integration instructions before adopting it.

Configure the plan, deployment trigger, timeout, result polling, report output, and secrets. Where required, pass the **environment**, **android-build**, or **ios-build** override. A mobile build must be a reachable app artifact, not an HTML sign-in page saved with an `.apk` or `.ipa` extension.

## Step 3: validate the gate

| Controlled check               | Expected behavior                                |
| ------------------------------ | ------------------------------------------------ |
| Known passing candidate        | Terminal success with a matching ContextQA run   |
| Deliberately failing assertion | Pipeline fails according to the release rule     |
| Application cannot be reached  | Clear execution/setup failure, not false success |
| No cases execute               | Incomplete verification is surfaced              |
| Run exceeds the time limit     | Timeout and cancellation policy takes effect     |
| New corrective commit          | Fresh execution verifies the updated build       |

Test these conditions on a controlled branch. Then configure repository or deployment protections around the verified execution check.

## Frequently asked questions

### Is a PR impact status check already a release gate?

The impact-analysis provider status is advisory. Use actual execution results and configured repository protections for enforcement. [PR impact analysis](https://learning.contextqa.com/enterprise-application-testing/ai-features/pr-impact-analysis.md) helps select scope but does not replace execution.

### Why did the plan test an older deployment?

Check the deployed SHA, environment override, and URLs embedded in steps. A fixed URL can bypass the intended environment. Verify build identity before classifying the result.

### Where should the reports go?

Keep run links and supported machine-readable reports with the CI job. Check per-test reporting permissions and provider artifact configuration. Retain enough metadata to associate the result with the candidate commit.

Next: [Testing AI-generated code](https://learning.contextqa.com/enterprise-application-testing/ship/testing-ai-generated-code.md) · [Release readiness](https://learning.contextqa.com/enterprise-application-testing/ship/release-readiness.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learning.contextqa.com/integrations-and-developer-tools/integrations/ci-cd-release-gates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
