Skip to content

Commit 6f4b66e

Browse files
Migrate Autoscan Task from Cirrus to GitHub actions
1 parent b3151bc commit 6f4b66e

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.cirrus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ ruling_win_task:
257257
- mvn package --batch-mode "-Pit-ruling,$PROFILE" -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=methods -DuseUnlimitedThreads=true
258258
cleanup_before_cache_script: cleanup_maven_repository
259259

260+
# Migrated to GHA.
260261
autoscan_task:
261262
depends_on:
262263
- build

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,44 @@ 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-s
186+
name: Autoscan Tests
187+
permissions:
188+
id-token: write
189+
contents: write
190+
steps:
191+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
192+
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
193+
with:
194+
version: 2025.7.12
195+
- uses: SonarSource/vault-action-wrapper@v3
196+
id: secrets
197+
with:
198+
secrets: |
199+
development/kv/data/next url | SONAR_HOST_URL;
200+
development/kv/data/next token | SONAR_TOKEN;
201+
- name: Compile Test Sources
202+
env:
203+
SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
204+
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
205+
working-directory: java-checks-test-sources
206+
run: |
207+
mvn clean compile test-compile --batch-mode
208+
- name: Run autoscan tests
209+
env:
210+
SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
211+
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
212+
working-directory: its/autoscan
213+
run: >
214+
mvn clean package --batch-mode --errors --show-version
215+
--activate-profiles it-autoscan
216+
-Dsonar.runtimeVersion=LATEST_RELEASE
217+
-Dmaven.test.redirectTestOutputToFile=false
218+
-Dparallel=methods
219+
-DuseUnlimitedThreads=true

0 commit comments

Comments
 (0)