You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs.kosli.com/content/client_reference/kosli_attest_sonar.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,26 +2,26 @@
2
2
title: "kosli attest sonar"
3
3
beta: false
4
4
deprecated: false
5
-
summary: "Report a SonarCloud or SonarQube attestation to an artifact or a trail in a Kosli flow. "
5
+
summary: "Report a SonarQube attestation to an artifact or a trail in a Kosli flow. "
6
6
---
7
7
8
8
# kosli attest sonar
9
9
10
10
## Synopsis
11
11
12
-
Report a SonarCloud or SonarQube attestation to an artifact or a trail in a Kosli flow.
13
-
Retrieves results for the specified scan from SonarCloud or SonarQube and attests them to Kosli.
12
+
Report a SonarQube attestation to an artifact or a trail in a Kosli flow.
13
+
Retrieves results for the specified scan from SonarQube Cloud or SonarQube Server and attests them to Kosli.
14
14
The results are parsed to find the status of the project's quality gate which is used to determine the attestation's compliance status.
15
15
16
16
The scan to be retrieved can be specified in two ways:
17
17
1. (Default) Using metadata created by the Sonar scanner. By default this is located within a temporary .scannerwork folder in the repo base directory.
18
18
If you have overriden the location of this folder by passing parameters to the Sonar scanner, or are running Kosli's CLI locally outside the repo's base directory,
19
19
you can provide the correct path using the --sonar-working-dir flag. This metadata is generated by a specific scan, allowing Kosli to retrieve the results of that scan.
20
20
2. Providing the Sonar project key and the revision of the scan (plus the SonarQube server URL if relevant). If running the Kosli CLI in some CI/CD pipeline, the revision
21
-
is defaulted to the commit SHA. If you are running the command locally, or have overriden the revision in SonarCloud/SonarQube via parameters to the Sonar scanner, you can
21
+
is defaulted to the commit SHA. If you are running the command locally, or have overriden the revision in SonarQube via parameters to the Sonar scanner, you can
22
22
provide the correct revision using the --sonar-revision flag. Kosli then finds the scan results for the specified project key and revision.
23
23
24
-
Note that if your project is very large and you are using SonarCloud's automatic analysis, it is possible for the attest sonar command to run before the SonarCloud scan is completed.
24
+
Note that if your project is very large and you are using SonarQube Cloud's automatic analysis, it is possible for the attest sonar command to run before the SonarQube Cloud scan is completed.
25
25
In this case, we recommend using Kosli's Sonar webhook integration ( https://docs.kosli.com/integrations/sonar/ ) rather than the CLI to attest the scan results.
26
26
27
27
@@ -85,7 +85,7 @@ In [this YAML file](https://app.kosli.com/api/v2/livedocs/cyber-dojo/yaml?ci=git
85
85
86
86
## Examples Use Cases
87
87
88
-
**report a sonarcloud attestation about a trail using Sonar's metadata**
88
+
**report a SonarQube Cloud attestation about a trail using Sonar's metadata**
89
89
90
90
```shell
91
91
kosli attest sonar \
@@ -99,7 +99,7 @@ kosli attest sonar \
99
99
100
100
```
101
101
102
-
**report a sonarqube attestation about a trail using Sonar's metadata**
102
+
**report a SonarQube Server attestation about a trail using Sonar's metadata**
103
103
104
104
```shell
105
105
kosli attest sonar \
@@ -113,7 +113,7 @@ kosli attest sonar \
113
113
114
114
```
115
115
116
-
**report a sonarcloud attestation for a specific branch about a trail using key/revision**
116
+
**report a SonarQube Cloud attestation for a specific branch about a trail using key/revision**
117
117
118
118
```shell
119
119
kosli attest sonar \
@@ -129,7 +129,7 @@ kosli attest sonar \
129
129
130
130
```
131
131
132
-
**report a sonarqube attestation for a pull-request about a trail using key/revision**
132
+
**report a SonarQube Server attestation for a pull-request about a trail using key/revision**
133
133
134
134
```shell
135
135
kosli attest sonar \
@@ -146,7 +146,7 @@ kosli attest sonar \
146
146
147
147
```
148
148
149
-
**report a sonarcloud attestation about a trail with an attachment using Sonar's metadata**
149
+
**report a SonarQube Cloud attestation about a trail with an attachment using Sonar's metadata**
0 commit comments