### Quality Gate
Key | Description | Default
---|----|---
-`sonar.qualitygate.wait` | Forces the analysis step to poll the SonarQube instance and wait for the Quality Gate status. If there are no other options, you can use this to fail a pipeline build when the Quality Gate is failing. See the [CI Integration](/analysis/branch-pr-analysis-overview/) page for more information. |
+`sonar.qualitygate.wait` | Forces the analysis step to poll the SonarQube instance and wait for the Quality Gate status. If there are no other options, you can use this to fail a pipeline build when the Quality Gate is failing. See the [CI Integration](/analysis/ci-integration-overview/) page for more information. |
`sonar.qualitygate.timeout` | Sets the number of seconds that the scanner should wait for a report to be processed. | 300
### Deprecated
[[collapse]]
| ## SonarScanner CLI
|
-| **Note:** A project key has to be provided through a `sonar-project.properties` file, or through the command line parameter. For more information, see the [SonarScanner](/analysis/scan/sonarscanner/) documentation.
+| You can set up the SonarScanner CLI configuration the following ways:
|
-| Write the following in your `bitbucket-pipelines.yml`:
+| - **SonarQube Scan Bitbucket Pipe** – Using the SonarQube Scan Bitbucket Pipe is an easy way to set up a basic configuration. You'll find the Bitbucket Pipe and configuration instructions on the [SonarQube Scan Bitbucket Pipe](https://bitbucket.org/sonarsource/sonarqube-scan/) page.
|
-| ```
-| clone:
-| depth: full
+| - **Advanced Configuration** – If you need an advanced setup that allows for scanner caching, you can add the following to your `bitbucket-pipelines.yml` file:
|
-| pipelines:
-| branches:
-| '{master,develop}':
-| - step:
-| name: SonarQube analysis
-| image: sonarsource/sonar-scanner-cli:latest
-| caches:
-| - sonar
-| script:
-| - sonar-scanner
+| [[info]]
+| | This configuration is an alternative to the SonarQube Scan Bitbucket Pipe. If you do not need a setup that allows for scanner caching, we recommend using the Bitbucket Pipe.
|
-| pull-requests:
-| '**':
-| - step:
-| name: SonarQube analysis
-| image: sonarsource/sonar-scanner-cli:latest
-| caches:
-| - sonar
-| script:
-| - sonar-scanner
+| ```
+| clone:
+| depth: full
|
-| definitions:
-| caches:
-| sonar: /opt/sonar-scanner/.sonar
-| ```
+| pipelines:
+| branches:
+| '{master,develop}':
+| - step:
+| name: SonarQube analysis
+| image: sonarsource/sonar-scanner-cli:latest
+| caches:
+| - sonar
+| script:
+| - sonar-scanner
+|
+| pull-requests:
+| '**':
+| - step:
+| name: SonarQube analysis
+| image: sonarsource/sonar-scanner-cli:latest
+| caches:
+| - sonar
+| script:
+| - sonar-scanner
+|
+| definitions:
+| caches:
+| sonar: /opt/sonar-scanner/.sonar
+| ```
+|
+| [[info]]
+| | A project key has to be provided through a `sonar-project.properties` file, or through the command line parameter. For more information, see the [SonarScanner](/analysis/scan/sonarscanner/) documentation.
#### **Failing the pipeline job when the Quality Gate fails**
-In order for the Quality Gate to fail the pipeline when it is red on the SonarQube side, the scanner needs to wait for the SonarQube Quality Gate status. To enable this, pass the `-Dsonar.qualitygate.wait=true` parameter to the scanner in the `bitbucket-pipelines.yml` file.
-
-Example:
+You can use the [SonarQube Quality Gate Check Bitbucket Pipe](https://bitbucket.org/sonarsource/sonarqube-quality-gate) to ensure your code meets your quality standards by failing your pipeline job when your [Quality Gate](/user-guide/quality-gates/) fails.
-```
-mvn verify sonar:sonar -Dsonar.qualitygate.wait=true
-```
+If you do not want to use the SonarQube Quality Gate Check Pipe, you can instruct the scanner to wait for the SonarQube Quality Gate status at the end of the analysis. To enable this, pass the `-Dsonar.qualitygate.wait=true` parameter to the scanner in the `bitbucket-pipelines.yml` file.
This will make the analysis step poll SonarQube regularly until the Quality Gate is computed. This will increase your pipeline duration. Note that, if the Quality Gate is red, this will make the analysis step fail, even if the actual analysis itself is successful. We advise only using this parameter when necessary (for example, to block a deployment pipeline if the Quality Gate is red). It should not be used to report the Quality Gate status in a pull request, as this is already done with pull request decoration.
+++ /dev/null
----
-title: Overview
-url: /analysis/branch-pr-analysis-overview/
----
-
-_Merge and Pull Request analysis is available as part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) and [above](https://www.sonarsource.com/plans-and-pricing/)._
-
-SonarScanners running in GitLab CI/CD, Azure Pipelines, Cirrus CI, Bitbucket 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.
-
-[[warning]]
-| Automatic configuration is disabled if any branch or pull request properties have been set manually.
-
-## Failing a pipeline job when the Quality Gate fails
-If you're using Jenkins, you can suspend pipeline execution until the analysis' Quality Gate status is known. See the [Jenkins](/analysis/jenkins/) 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
-For GitLab CI/CD configuration, see the [GitLab ALM integration](/analysis/gitlab-integration/) page.
-
-## Azure Pipelines
-For Azure Pipelines configuration, see the [Azure DevOps integration](/analysis/azuredevops-integration/) page.
-
-## Bitbucket Pipelines
-For Bitbucket Pipelines configuration, see the [Bitbucket Cloud integration](/analysis/bitbucket-cloud-integration/) page.
-
-## Jenkins
-For Jenkins configuration, see [Jenkins](/analysis/jenkins/).
--- /dev/null
+---
+title: Overview
+url: /analysis/ci-integration-overview/
+---
+
+_Merge and Pull Request analysis is available as part of [Developer Edition](https://redirect.sonarsource.com/editions/developer.html) and [above](https://www.sonarsource.com/plans-and-pricing/)._
+
+SonarScanners running in GitLab CI/CD, Azure Pipelines, Cirrus CI, Bitbucket 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.
+
+[[warning]]
+| Automatic configuration is disabled if any branch or pull request properties have been set manually.
+
+## Failing a pipeline job when the Quality Gate fails
+You can ensure your code meets your quality standards by failing your pipeline job when your [Quality Gate](/user-guide/quality-gates/) fails.
+
+With Jenkins, you can suspend pipeline execution until the analysis' Quality Gate status is known. See the [Jenkins](/analysis/jenkins/) integration page.
+
+With GitHub Actions, you can fail the pipeline job when the Quality Gate fails using the [SonarQube Quality Gate Check Action](https://github.com/marketplace/actions/sonarqube-quality-gate-check).
+
+With Bitbucket Pipelines, you can fail the pipeline job when the Quality Gate fails using the [SonarQube Quality Gate Check Pipe](https://bitbucket.org/sonarsource/sonarqube-quality-gate).
+
+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
+For GitLab CI/CD configuration, see the [GitLab integration](/analysis/gitlab-integration/) page.
+
+## GitHub Actions
+For GitHub Actions configuration, see the [GitHub integration](/analysis/github-integration/) page.
+
+## Azure Pipelines
+For Azure Pipelines configuration, see the [Azure DevOps integration](/analysis/azuredevops-integration/) page.
+
+## Bitbucket Pipelines
+For Bitbucket Pipelines configuration, see the [Bitbucket Cloud integration](/analysis/bitbucket-cloud-integration/) page.
+
+## Jenkins
+For Jenkins configuration, see [Jenkins](/analysis/jenkins/).
{
"title": "CI Integration",
"children": [
- "/analysis/branch-pr-analysis-overview/",
+ "/analysis/ci-integration-overview/",
"/analysis/jenkins/"
]
},
"children": [
"/analysis/github-integration/",
"/analysis/gitlab-integration/",
- "/analysis/bitbucket-integration/",
- "/analysis/bitbucket-cloud-integration/",
+ {
+ "title": "Bitbucket Integration",
+ "children": [
+ "/analysis/bitbucket-integration/",
+ "/analysis/bitbucket-cloud-integration/"
+ ]
+ },
"/analysis/azuredevops-integration/"
]
},
{
"title": "CI Integration",
"children": [
- "/analysis/branch-pr-analysis-overview/",
+ "/analysis/ci-integration-overview/",
"/analysis/jenkins/"
]
},
"children": [
"/analysis/github-integration/",
"/analysis/gitlab-integration/",
- "/analysis/bitbucket-integration/",
- "/analysis/bitbucket-cloud-integration/",
+ {
+ "title": "Bitbucket Integration",
+ "children": [
+ "/analysis/bitbucket-integration/",
+ "/analysis/bitbucket-cloud-integration/"
+ ]
+ },
"/analysis/azuredevops-integration/"
]
},