@@ -14,6 +14,10 @@ concurrency:
1414 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1515 cancel-in-progress : true
1616
17+ env :
18+ USE_DEVELOCITY : true
19+ DEVELOCITY_URL : https://develocity-public.sonar.build/
20+
1721jobs :
1822 build :
1923 runs-on : github-ubuntu-latest-m # Public repo uses custom GitHub-hosted runner
3943 # Override artifactory roles for public repo using private access
4044 artifactory-reader-role : private-reader
4145 artifactory-deployer-role : qa-deployer
46+ use-develocity : ${{ env.USE_DEVELOCITY }}
47+ develocity-url : ${{ env.DEVELOCITY_URL }}
4248 maven-args : >
4349 --define maven.test.skip=true
4450 --define sonar.skip=true
7783 uses : SonarSource/ci-github-actions/config-maven@v1
7884 with :
7985 artifactory-reader-role : private-reader
86+ use-develocity : ${{ env.USE_DEVELOCITY }}
87+ develocity-url : ${{ env.DEVELOCITY_URL }}
8088 - name : Getting Vault Secrets
8189 id : secrets
8290 uses : SonarSource/vault-action-wrapper@320bd31b03e5dacaac6be51bbbb15adf7caccc32 # v3.1.0
@@ -126,6 +134,8 @@ jobs:
126134 uses : SonarSource/ci-github-actions/config-maven@v1
127135 with :
128136 artifactory-reader-role : private-reader
137+ use-develocity : ${{ env.USE_DEVELOCITY }}
138+ develocity-url : ${{ env.DEVELOCITY_URL }}
129139 - name : Getting Vault Secrets
130140 id : secrets
131141 uses : SonarSource/vault-action-wrapper@320bd31b03e5dacaac6be51bbbb15adf7caccc32 # v3.1.0
@@ -170,9 +180,9 @@ jobs:
170180 mvn clean compile --batch-mode
171181 - uses : SonarSource/ci-github-actions/config-maven@v1
172182 with :
173- deploy : false
174183 artifactory-reader-role : private-reader
175- artifactory-deployer-role : qa-deployer
184+ use-develocity : ${{ env.USE_DEVELOCITY }}
185+ develocity-url : ${{ env.DEVELOCITY_URL }}
176186 - name : Sanity Test
177187 env :
178188 SONAR_HOST_URL : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
@@ -208,11 +218,45 @@ jobs:
208218 deploy : false
209219 artifactory-reader-role : private-reader # Override default public-reader
210220 artifactory-deployer-role : qa-deployer # Override default public-deployer
221+ use-develocity : ${{ env.USE_DEVELOCITY }}
222+ develocity-url : ${{ env.DEVELOCITY_URL }}
211223 scanner-java-opts : ' -Xmx2g'
212224 env :
213225 SONAR_HOST_URL : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
214226 SONAR_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
215227 JAVA_TOOL_OPTIONS : " " # Set an empty value to avoid issues with runners hanging and significantly slowing down builds
228+
229+ custom-rules-license-check :
230+ name : Custom Rules and License Check
231+ needs :
232+ - build
233+ if : ${{ needs.build.outputs.deployed }}
234+ runs-on : github-ubuntu-latest-m
235+ permissions :
236+ id-token : write
237+ contents : write
238+ env :
239+ BUILD_NUMBER : ${{ needs.build.outputs.build-number }}
240+ steps :
241+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
242+ - uses : jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
243+ with :
244+ version : 2025.7.12
245+ - uses : SonarSource/vault-action-wrapper@v3
246+ id : secrets
247+ with :
248+ secrets : |
249+ development/kv/data/next url | SONAR_HOST_URL;
250+ development/kv/data/next token | SONAR_TOKEN;
251+ - uses : SonarSource/ci-github-actions/config-maven@v1
252+ with :
253+ artifactory-reader-role : private-reader
254+ use-develocity : ${{ env.USE_DEVELOCITY }}
255+ develocity-url : ${{ env.DEVELOCITY_URL }}
256+ env :
257+ SONAR_HOST_URL : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
258+ SONAR_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
259+ JAVA_TOOL_OPTIONS : " " # Set an empty value to avoid issues with runners hanging and significantly slowing down builds
216260 - name : Build Java Custom Rules Example
217261 env :
218262 SONAR_HOST_URL : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
@@ -266,9 +310,9 @@ jobs:
266310 run : mise use java@17
267311 - uses : SonarSource/ci-github-actions/config-maven@v1
268312 with :
269- deploy : false
270313 artifactory-reader-role : private-reader
271- artifactory-deployer-role : qa-deployer
314+ use-develocity : ${{ env.USE_DEVELOCITY }}
315+ develocity-url : ${{ env.DEVELOCITY_URL }}
272316 - name : Run autoscan tests
273317 env :
274318 SONAR_HOST_URL : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
@@ -297,6 +341,12 @@ jobs:
297341 - uses : jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
298342 with :
299343 version : 2025.7.12
344+ - name : Configure Maven
345+ uses : SonarSource/ci-github-actions/config-maven@v1
346+ with :
347+ artifactory-reader-role : private-reader
348+ use-develocity : ${{ env.USE_DEVELOCITY }}
349+ develocity-url : ${{ env.DEVELOCITY_URL }}
300350 - name : Run Maven
301351 run : mvn clean verify --batch-mode
302352
@@ -307,6 +357,7 @@ jobs:
307357 - plugin-qa
308358 - sanity
309359 - test-analyze
360+ - custom-rules-license-check
310361 - autoscan
311362 - qa-os-win
312363 if : ${{ needs.build.outputs.deployed }}
0 commit comments