Browse Source

SONAR-15412 Update documentation on supported CI for automatic pull request and branch detection

tags/9.2.0.49834
Mathieu Suen 2 years ago
parent
commit
2239a5d1cf

+ 0
- 5
server/sonar-docs/src/pages/analysis/ci-integration-overview.md View File

@@ -5,11 +5,6 @@ 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.


+ 12
- 3
server/sonar-docs/src/pages/analysis/pull-request.md View File

@@ -5,7 +5,7 @@ url: /analysis/pull-request/

_Pull Request analysis is available starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html)._

You can see your Pull Requests in SonarQube from the Branches and Pull Requests dropdown menu of your project.
You can see your Pull Requests in SonarQube from the Branches and Pull Requests dropdown menu of your project.

Pull Request analysis shows your Pull Request's Quality Gate and analysis in the SonarQube interface. This analysis shows new issues introduced by the Pull Request before merging with the target branch:

@@ -40,10 +40,19 @@ Pull request analyses on SonarQube are deleted automatically after 30 days with

## Analysis parameters

The following parameters enable PR analysis.
The following parameters enable Pull Request analysis.

[[info]]
| Scanners running on Jenkins with the Branch Source plugin configured, GitLab CI/CD, Bitbucket Pipelines, Azure Pipelines, and Cirrus CI automatically detect these parameters, and you don't need to pass them manually.
| Scanners can automatically detect Pull Request parameters when running on the following CI services:
| * Azure Pipelines
| * Bitbucket Pipelines
| * Cirrus CI
| * Codemagic
| * GitHub Actions
| * GitLab CI/CD
| * Jenkins (with the Branch Source plugin configured)
|
| Manually setting Pull Request parameters overrides automatic detection.

| Parameter Name | Description |
| --------------------- | ---------------------------------- |

+ 12
- 0
server/sonar-docs/src/pages/branches/overview.md View File

@@ -38,6 +38,18 @@ The branch Quality Gate lets you know if your branch is ready to be merged. Each

A branch is created when the `sonar.branch.name` parameter is passed during analysis.

[[info]]
| Scanners can automatically detect branch parameters when running on the following CI services:
| * Azure Pipelines
| * Bitbucket Pipelines
| * Cirrus CI
| * Codemagic
| * GitHub Actions
| * GitLab CI/CD
| * Jenkins (with the Branch Source plugin configured)
|
| Manually setting branch parameters overrides automatic detection.

| Parameter Name | Description |
| --------------------- | ------------------------------------------------- |
| `sonar.branch.name` | Name of the branch (visible in the UI)

Loading…
Cancel
Save