aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs/src/pages
diff options
context:
space:
mode:
authormichaelbirnstiehl <michael.birnstiehl@sonarsource.com>2021-05-14 08:41:53 -0500
committersonartech <sonartech@sonarsource.com>2021-05-26 20:13:17 +0000
commit3b1e2236ac89489a4779ca48eeea551c671c0b62 (patch)
treeb60e52feb80a02d052dd8e8ad74a5848fb404fb6 /server/sonar-docs/src/pages
parent4d86c379f7fff313f76c36c6341a5420874f9907 (diff)
downloadsonarqube-3b1e2236ac89489a4779ca48eeea551c671c0b62.tar.gz
sonarqube-3b1e2236ac89489a4779ca48eeea551c671c0b62.zip
SONAR-14818 Document use of Pipes for Bitbucket Pipes
Diffstat (limited to 'server/sonar-docs/src/pages')
-rw-r--r--server/sonar-docs/src/pages/analysis/analysis-parameters.md2
-rw-r--r--server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md72
-rw-r--r--server/sonar-docs/src/pages/analysis/ci-integration-overview.md (renamed from server/sonar-docs/src/pages/analysis/branch-pr-analysis-overview.md)15
3 files changed, 51 insertions, 38 deletions
diff --git a/server/sonar-docs/src/pages/analysis/analysis-parameters.md b/server/sonar-docs/src/pages/analysis/analysis-parameters.md
index 2dd6f93fa48..0f713564c63 100644
--- a/server/sonar-docs/src/pages/analysis/analysis-parameters.md
+++ b/server/sonar-docs/src/pages/analysis/analysis-parameters.md
@@ -97,7 +97,7 @@ Key | Description | Default
### 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
diff --git a/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md b/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md
index 07a2fd392ca..17eb28aa013 100644
--- a/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md
+++ b/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md
@@ -166,48 +166,52 @@ Click the scanner you're using below to expand the example configuration:
[[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.
diff --git a/server/sonar-docs/src/pages/analysis/branch-pr-analysis-overview.md b/server/sonar-docs/src/pages/analysis/ci-integration-overview.md
index 787e1512acb..28b5c36aa91 100644
--- a/server/sonar-docs/src/pages/analysis/branch-pr-analysis-overview.md
+++ b/server/sonar-docs/src/pages/analysis/ci-integration-overview.md
@@ -1,6 +1,6 @@
---
title: Overview
-url: /analysis/branch-pr-analysis-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/)._
@@ -11,14 +11,23 @@ SonarScanners running in GitLab CI/CD, Azure Pipelines, Cirrus CI, Bitbucket Pip
| 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.
+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 ALM integration](/analysis/gitlab-integration/) page.
+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.