@@ -176,3 +176,57 @@ jobs:
176176 "-Dlicense.missingFile=${PWD}/missing-dep-licenses.properties" \
177177 -DuseMissingFile \
178178 "-Dlicense.overrideUrl=file://${PWD}/override-dep-licenses.properties"
179+
180+ autoscan :
181+ name : Autoscan Tests
182+ needs :
183+ - build
184+ if : ${{ needs.build.outputs.deployed }}
185+ runs-on : github-ubuntu-latest-m
186+ permissions :
187+ id-token : write
188+ contents : write
189+ env :
190+ BUILD_NUMBER : ${{ needs.build.outputs.build-number }}
191+ steps :
192+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
193+ # For now, the autoscan job need to execute two mvn commands:
194+ # * The build of java-checks-test-sources module which requires Java 24.
195+ # * The tests using Orchestrator and SonarQube that, for now, fail to work using Java 24
196+ - uses : jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
197+ with :
198+ version : 2025.7.12
199+ - uses : SonarSource/vault-action-wrapper@v3
200+ id : secrets
201+ with :
202+ secrets : |
203+ development/kv/data/next url | SONAR_HOST_URL;
204+ development/kv/data/next token | SONAR_TOKEN;
205+ development/github/token/licenses-ro token | GITHUB_TOKEN;
206+ - name : Compile Test Sources
207+ env :
208+ SONAR_HOST_URL : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
209+ SONAR_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
210+ working-directory : java-checks-test-sources
211+ run : |
212+ mvn clean compile test-compile --batch-mode
213+ - name : Select Java 17
214+ run : mise use java@17
215+ - uses : SonarSource/ci-github-actions/config-maven@v1
216+ with :
217+ deploy : false
218+ artifactory-reader-role : private-reader
219+ artifactory-deployer-role : qa-deployer
220+ - name : Run autoscan tests
221+ env :
222+ SONAR_HOST_URL : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
223+ SONAR_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
224+ GITHUB_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
225+ working-directory : its/autoscan
226+ run : >
227+ mvn clean package --batch-mode --errors --show-version
228+ --activate-profiles it-autoscan
229+ -Dsonar.runtimeVersion=LATEST_RELEASE
230+ -Dmaven.test.redirectTestOutputToFile=false
231+ -Dparallel=methods
232+ -DuseUnlimitedThreads=true
0 commit comments