Skip to content

Commit bde54e8

Browse files
SONARJAVA-6229 Call config-maven before manually compiling test sources
Fixed a bug that breaks compilation of java-checks-test-sources in CI when a maven dependency, namely com.mycila:license-check:4.6, is missing from repox. This bug prevented the upgrade to version 87 of parent-oss.
1 parent d8982bb commit bde54e8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,18 @@ jobs:
177177
secrets: |
178178
development/kv/data/next url | SONAR_HOST_URL;
179179
development/kv/data/next token | SONAR_TOKEN;
180+
- uses: SonarSource/ci-github-actions/config-maven@v1
181+
with:
182+
artifactory-reader-role: private-reader
183+
use-develocity: ${{ env.USE_DEVELOCITY }}
184+
develocity-url: ${{ env.DEVELOCITY_URL }}
180185
- name: Compile Test Sources
181186
env:
182187
SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
183188
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }}
184189
working-directory: java-checks-test-sources
185190
run: |
186191
mvn clean compile --batch-mode
187-
- uses: SonarSource/ci-github-actions/config-maven@v1
188-
with:
189-
artifactory-reader-role: private-reader
190-
use-develocity: ${{ env.USE_DEVELOCITY }}
191-
develocity-url: ${{ env.DEVELOCITY_URL }}
192192
- name: Sanity Test
193193
env:
194194
SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
@@ -305,6 +305,11 @@ jobs:
305305
development/kv/data/next url | SONAR_HOST_URL;
306306
development/kv/data/next token | SONAR_TOKEN;
307307
development/github/token/licenses-ro token | GITHUB_TOKEN;
308+
- uses: SonarSource/ci-github-actions/config-maven@v1
309+
with:
310+
artifactory-reader-role: private-reader
311+
use-develocity: ${{ env.USE_DEVELOCITY }}
312+
develocity-url: ${{ env.DEVELOCITY_URL }}
308313
- name: Compile Test Sources
309314
env:
310315
SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}
@@ -314,11 +319,6 @@ jobs:
314319
mvn clean compile test-compile --batch-mode
315320
- name: Select Java 21
316321
run: mise use java@21
317-
- uses: SonarSource/ci-github-actions/config-maven@v1
318-
with:
319-
artifactory-reader-role: private-reader
320-
use-develocity: ${{ env.USE_DEVELOCITY }}
321-
develocity-url: ${{ env.DEVELOCITY_URL }}
322322
- name: Run autoscan tests
323323
env:
324324
SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}

0 commit comments

Comments
 (0)