Skip to content

Commit 71b462e

Browse files
Add shadow scan github workflow
Running an analysis each night on SQC EU & US in addition to the analysis on next on every commit.
1 parent 3dff5f6 commit 71b462e

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.github/workflows/shadow_scans.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Shadow scans
2+
on:
3+
schedule:
4+
# Run the workflow every day at 04:00 UTC
5+
- cron: "0 1 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
scan:
10+
runs-on: github-ubuntu-latest-s
11+
name: Scan on shadow platforms
12+
permissions:
13+
id-token: write
14+
contents: write
15+
steps:
16+
- name: Vault
17+
id: secrets
18+
uses: SonarSource/vault-action-wrapper@v3
19+
with:
20+
secrets: |
21+
development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ARTIFACTORY_ACCESS_TOKEN;
22+
development/kv/data/sonarcloud token | SQC_EU_TOKEN;
23+
- uses: actions/checkout@v4
24+
- uses: jdx/mise-action@v2
25+
- uses: SonarSource/ci-github-actions/build-gradle@master # dogfood
26+
env:
27+
ARTIFACTORY_PRIVATE_USERNAME: vault-{REPO_OWNER_NAME_DASH}-private-reader
28+
ARTIFACTORY_PRIVATE_PASSWORD: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
29+
with:
30+
run-shadow-scans: true
31+
artifactory-reader-role: private-reader
32+
artifactory-deployer-role: qa-deployer
33+
gradle-args: -Dsonar.organization=sonarsource -Dsonar.exclusions="**/build/**/*,**/its/**,**/kotlin-checks-test-sources/**"
34+
- name: Run IRIS Analysis
35+
uses: SonarSource/unified-dogfooding-actions/run-iris@v1
36+
with:
37+
primary_project_key: "org.sonarsource.kotlin:kotlin"
38+
primary_platform: "Next"
39+
shadow1_project_key: "org.sonarsource.kotlin:kotlin"
40+
shadow1_platform: "SQC-EU"
41+
shadow2_project_key: "org.sonarsource.kotlin:kotlin"
42+
shadow2_platform: "SQC-US"

.mise.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
java = "17.0"
3+
gradle = "8.10.1"

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ sonarqube {
234234
property("sonar.links.scm", "https://github.com/SonarSource/sonar-kotlin")
235235
property("sonar.links.issue", "https://jira.sonarsource.com/browse/SONARKT")
236236
property("sonar.exclusions", "**/build/**/*")
237-
property("sonar.sca.exclusions", "**/its/**,**/kotlin-checks-test-sources/**")
237+
property("sonar.sca.exclusions", "**/its/**,**/kotlin-checks-test-sources/**,**/test/resources/**,**/test/samples/**")
238238
}
239239
}
240240

0 commit comments

Comments
 (0)