diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90b715cc36..5d258dced6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,13 +33,14 @@ jobs: id: build-maven with: deploy-pull-request: true + sonar-platform: none # Prevent analysis # Override artifactory roles for public repo using private access artifactory-reader-role: private-reader artifactory-deployer-role: qa-deployer maven-args: > - -Dmaven.test.skip=true - -Dsonar.skip=true - -pl !java-checks-test-sources/default,!java-checks-test-sources/aws,!java-checks-test-sources/spring-web-4.0 + --define maven.test.skip=true + --define sonar.skip=true + --projects !java-checks-test-sources/aws,!java-checks-test-sources/default,!java-checks-test-sources/java-17,!java-checks-test-sources/spring-3.2,!java-checks-test-sources/spring-web-4.0 ruling-qa: strategy: @@ -195,13 +196,15 @@ jobs: secrets: | development/kv/data/next url | SONAR_HOST_URL; development/kv/data/next token | SONAR_TOKEN; - - name: Test Analyze + - uses: SonarSource/ci-github-actions/build-maven@v1 + with: + deploy: false + artifactory-reader-role: private-reader # Override default public-reader + artifactory-deployer-role: qa-deployer # Override default public-deployer env: SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }} SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }} - run: | - # ignore duplications in the SE engine plugin, as it will be moved away from sonar-java at some point - PULL_REQUEST_SHA=$GIT_SHA1 mvn clean verify sonar:sonar --batch-mode -P-deploy-sonarsource,-release,-sign -Dmaven.deploy.skip=true -Dsonar.analysisCache.enabled=true -Dsonar.sca.exclusions="**/test/files/**, **/test/resources/**, its/plugin/projects/**, java-checks-test-sources/**, its/sources/**," + JAVA_TOOL_OPTIONS: "" # Set an empty value to avoid issues with runners hanging and significantly slowing down builds - name: Build Java Custom Rules Example env: SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }}