Skip to content

Commit cbe54ef

Browse files
authored
SONARGO-670 Migration from Cirrus CI to GitHub Actions cloud-native-gradle-modules (#86)
1 parent 11dd4c6 commit cbe54ef

File tree

5 files changed

+58
-48
lines changed

5 files changed

+58
-48
lines changed

.cirrus.star

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- branch-*
7+
pull_request:
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
name: Build
17+
runs-on: github-ubuntu-latest-s
18+
permissions:
19+
id-token: write
20+
contents: write
21+
steps:
22+
- uses: actions/checkout@v5
23+
with:
24+
fetch-depth: 0
25+
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
26+
with:
27+
version: 2025.7.12
28+
- name: get secrets
29+
id: secrets
30+
uses: SonarSource/vault-action-wrapper@v3
31+
with:
32+
secrets: |
33+
development/kv/data/develocity token | DEVELOCITY_TOKEN;
34+
35+
# The SonarSource/ci-github-actions/build-gradle fails because of no access to ARTIFACTORY_DEPLOY_USERNAME
36+
# it is not needed in this case, so the Gradle is called directly
37+
- name: Build with Gradle
38+
env:
39+
DEVELOCITY_ACCESS_KEY: develocity-public.sonar.build=${{ fromJSON(steps.secrets.outputs.vault).DEVELOCITY_TOKEN }}
40+
run: |
41+
./gradlew build

.github/workflows/pr-cleanup.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Cleanup PR Resources
2+
on:
3+
pull_request:
4+
types: [closed]
5+
6+
jobs:
7+
cleanup:
8+
runs-on: github-ubuntu-latest-s
9+
permissions:
10+
actions: write
11+
steps:
12+
- uses: SonarSource/ci-github-actions/pr_cleanup@v1
13+

mise.toml

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

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencyResolutionManagement {
3636
}
3737

3838
develocity {
39-
server.set("https://develocity.sonar.build")
39+
server.set("https://develocity-public.sonar.build/")
4040
}
4141

4242
val isCI = System.getenv("CI") != null

0 commit comments

Comments
 (0)