Skip to content

Commit 705a14f

Browse files
SQRP-122 Reference SonarQube Community Build
1 parent 2a53a0f commit 705a14f

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

README.md

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
# SonarQube Server Quality Gate check [![QA](https://github.com/SonarSource/sonarqube-quality-gate-action/actions/workflows/run-qa.yml/badge.svg)](https://github.com/SonarSource/sonarqube-quality-gate-action/actions/workflows/run-qa.yml)
1+
# SonarQube Quality Gate check [![QA](https://github.com/SonarSource/sonarqube-quality-gate-action/actions/workflows/run-qa.yml/badge.svg)](https://github.com/SonarSource/sonarqube-quality-gate-action/actions/workflows/run-qa.yml)
22

3-
Check the Quality Gate of your code with [SonarQube Server](https://www.sonarsource.com/products/sonarqube/) to ensure your code meets your own quality standards before you release or deploy new features.
3+
Check the Quality Gate of your code with [SonarQube Server](https://www.sonarsource.com/products/sonarqube/) and [SonarQube Community Build](https://www.sonarsource.com/open-source-editions/sonarqube-community-edition/) to ensure your code meets your own quality standards before you release or deploy new features.
44

5-
<img src="./images/SonarQubeServer.png">
5+
<picture>
6+
<source media="(prefers-color-scheme: dark)" srcset="./images/SonarQube_dark.png">
7+
<img alt="Text changing depending on mode. Light: 'So light!' Dark: 'So dark!'" src="./images/SonarQube_light.png">
8+
</picture>
69

7-
SonarQube Server is the leading product for Continuous Code Quality & Code Security. It supports most popular programming languages, including Java, JavaScript, TypeScript, C#, Python, C, C++, and many more.
10+
[SonarQube Server](https://www.sonarsource.com/products/sonarqube/) and [SonarQube Community Build](https://www.sonarsource.com/open-source-editions/sonarqube-community-edition/) are widely used static analysis solutions for continuous code quality and security inspection.
11+
12+
They help developers detect coding issues in 30+ languages, frameworks, and IaC platforms, including Java, JavaScript, TypeScript, C#, Python, C, C++, and [many more](https://www.sonarsource.com/knowledge/languages/).
813

914
## Requirements
1015

1116
A previous step must have run an analysis on your code.
1217

13-
Read more information on how to analyze your code [here](https://docs.sonarqube.org/latest/analysis/github-integration/)
18+
Read more information on how to analyze your code for SonarQube Server [here](https://docs.sonarsource.com/sonarqube-server/latest/devops-platform-integration/github-integration/introduction/) and for SonarQube Community Build [here](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/github-integration/introduction/)
1419

1520
## Usage
1621

@@ -36,14 +41,14 @@ jobs:
3641
fetch-depth: 0
3742

3843
# Triggering SonarQube analysis as results of it are required by Quality Gate check.
39-
- name: SonarQube Server Scan
44+
- name: SonarQube Scan
4045
uses: sonarsource/sonarqube-scan-action@master
4146
env:
4247
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4348
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
4449

4550
# Check the Quality Gate status.
46-
- name: SonarQube Server Quality Gate check
51+
- name: SonarQube Quality Gate check
4752
id: sonarqube-quality-gate-check
4853
uses: sonarsource/sonarqube-quality-gate-action@master
4954
with:
@@ -54,13 +59,13 @@ jobs:
5459

5560
# Optionally you can use the output from the Quality Gate in another step.
5661
# The possible outputs of the `quality-gate-status` variable are `PASSED`, `WARN` or `FAILED`.
57-
- name: "Example show SonarQube Server Quality Gate Status value"
62+
- name: "Example show SonarQube Quality Gate Status value"
5863
run: echo "The Quality Gate status is ${{ steps.sonarqube-quality-gate-check.outputs.quality-gate-status }}"
5964
```
6065
6166
Make sure to set up `pollingTimeoutSec` property in your step, to avoid wasting action minutes per month (see above example). If not provided, the default value of 300s is applied.
6267

63-
When using this action with [sonarsource/sonarqube-scan](https://github.com/SonarSource/sonarqube-scan-action) action or with [C/C++ code analysis](https://docs.sonarqube.org/latest/analysis/languages/cfamily/) you don't have to provide `scanMetadataReportFile` input, otherwise you should alter the location of it.
68+
When using this action with [sonarsource/sonarqube-scan](https://github.com/SonarSource/sonarqube-scan-action) action or with [C/C++ code analysis](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/c-family/overview/) (available only for SonarQube Server) you don't have to provide `scanMetadataReportFile` input, otherwise you should alter the location of it.
6469

6570
Typically, report metadata file for different scanners can vary and can be located in:
6671

@@ -71,19 +76,19 @@ Typically, report metadata file for different scanners can vary and can be locat
7176
Example usage:
7277

7378
```yaml
74-
- name: SonarQube Server Quality Gate check
79+
- name: SonarQube Quality Gate check
7580
uses: sonarsource/sonarqube-quality-gate-action@master
7681
with:
7782
scanMetadataReportFile: target/sonar/report-task.txt
7883
```
7984

8085
### Environment variables
8186

82-
- `SONAR_TOKEN` – **Required** this is the token used to authenticate access to SonarQube Server. You can read more about security tokens [here](https://docs.sonarqube.org/latest/user-guide/user-token/). You can set the `SONAR_TOKEN` environment variable in the "Secrets" settings page of your repository, or you can add them at the level of your GitHub organization (recommended).
87+
- `SONAR_TOKEN` – **Required** this is the token used to authenticate access to SonarQube. You can read more about security tokens [here](https://docs.sonarqube.org/latest/user-guide/user-token/). You can set the `SONAR_TOKEN` environment variable in the "Secrets" settings page of your repository, or you can add them at the level of your GitHub organization (recommended).
8388

84-
- `SONAR_HOST_URL` – **Optional** this tells the scanner where SonarQube Server is hosted, otherwise it will get the one from the scan report. You can set the `SONAR_HOST_URL` environment variable in the "Secrets" settings page of your repository, or you can add them at the level of your GitHub organization (recommended).
89+
- `SONAR_HOST_URL` – **Optional** this tells the scanner where SonarQube is hosted, otherwise it will get the one from the scan report. You can set the `SONAR_HOST_URL` environment variable in the "Secrets" settings page of your repository, or you can add them at the level of your GitHub organization (recommended).
8590

86-
- `SONAR_ROOT_CERT` – Holds an additional root certificate (in PEM format) that is used to validate the SonarQube Server certificate. You can set the `SONAR_ROOT_CERT` environment variable in the "Secrets" settings page of your repository, or you can add them at the level of your GitHub organization (recommended).
91+
- `SONAR_ROOT_CERT` – Holds an additional root certificate (in PEM format) that is used to validate the SonarQube certificate. You can set the `SONAR_ROOT_CERT` environment variable in the "Secrets" settings page of your repository, or you can add them at the level of your GitHub organization (recommended).
8792

8893
## Quality Gate check run
8994

images/SonarQubeServer.png

-3.89 KB
Binary file not shown.

images/SonarQube_dark.png

5.92 KB
Loading

images/SonarQube_light.png

6.14 KB
Loading

0 commit comments

Comments
 (0)