> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/8.9/analyzing-source-code/ci-integration/overview.md).

# Overview

*Merge and Pull Request analysis is available as part of* [*Developer Edition*](https://www.sonarsource.com/plans-and-pricing/developer/) *and* [*above*](https://www.sonarsource.com/plans-and-pricing/)*.*

SonarScanners running in GitLab CI/CD, Azure Pipelines, and Jenkins with a Branch Source plugin configured can automatically detect branches and merge or pull requests by using environment variables set in the jobs.

{% hint style="warning" %}
Automatic configuration is disabled if any branch or pull request properties have been set manually.
{% endhint %}

## Failing a pipeline job when the quality gate fails <a href="#quality-gate-fails" id="quality-gate-fails"></a>

If you’re using Jenkins, you can suspend pipeline execution until the analysis’ Quality Gate status is known. See the [Jenkins integration](/sonarqube-server/8.9/analyzing-source-code/ci-integration/jenkins-integration.md) integration page.

For other CIs, you can use the `sonar.qualitygate.wait=true` analysis parameter in your configuration file. Setting `sonar.qualitygate.wait` to true forces the analysis step to poll your SonarQube instance until the Quality Gate status is available. This increases the pipeline duration and causes the analysis step to fail any time the Quality Gate fails, even if the actual analysis is successful. You should only use this parameter if it’s necessary.

You can set the `sonar.qualitygate.timeout` property to the number of seconds that the scanner should wait for a report to be processed. The default is 300 seconds.

## GitLab CI/CD <a href="#gitlab" id="gitlab"></a>

For GitLab CI/CD configuration, see the [GitLab integration](/sonarqube-server/8.9/alm-integration/gitlab-integration.md) page.

## Azure Pipelines <a href="#azure-pipelines" id="azure-pipelines"></a>

For Azure Pipelines configuration, see the [Azure DevOps integration](/sonarqube-server/8.9/alm-integration/azure-devops-integration.md) page.

## Bitbucket Pipelines <a href="#bitbucket-pipeline" id="bitbucket-pipeline"></a>

For Bitbucket Pipelines configuration, see the [Bitbucket Cloud integration](/sonarqube-server/8.9/alm-integration/bitbucket-cloud-integration.md) page.

## Jenkins <a href="#jenkins" id="jenkins"></a>

For Jenkins configuration, see [SonarScanner for Jenkins](/sonarqube-server/8.9/analyzing-source-code/scanners/sonarscanner-for-jenkins.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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/8.9/analyzing-source-code/ci-integration/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
