Skip to content

Commit dd21384

Browse files
committed
Only run a single sonar build on main push
Currently when I look at the results for main, it switches between ~20 failures and ~600 failures depending on which build has last run. To fix this the maven.yaml workflow now includes the operator module in the sonar run so that there is a single run and report for main. Signed-off-by: Robert Young <robertyoungnz@gmail.com>
1 parent a5b8e81 commit dd21384

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

.github/workflows/maven.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ jobs:
9797
KROXYLICIOUS_KMS_FORTANIX_API_ENDPOINT: ${{ vars.KROXYLICIOUS_KMS_FORTANIX_API_ENDPOINT }}
9898
KROXYLICIOUS_KMS_FORTANIX_ADMIN_API_KEY: ${{ secrets.KROXYLICIOUS_KMS_FORTANIX_ADMIN_API_KEY }}
9999
KROXYLICIOUS_KMS_FORTANIX_API_KEY: ${{ secrets.KROXYLICIOUS_KMS_FORTANIX_API_KEY }}
100-
run: mvn -B verify -Pci -Djapicmp.skip=${REFERENCE_RELEASE_UNPUBLISHED} org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar -Dsonar.projectKey=kroxylicious_kroxylicious -pl ''!:kroxylicious-operator''
100+
run: mvn -B verify -Pci -Djapicmp.skip=${REFERENCE_RELEASE_UNPUBLISHED} org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar -Dsonar.projectKey=kroxylicious_kroxylicious

.github/workflows/operator-maven.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ jobs:
8686
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8787
run: |
8888
mvn -B install -Pci -Djapicmp.skip=true -pl ':kroxylicious-operator' -am
89-
- name: 'Build Kroxylicious maven project on main with Sonar'
90-
if: github.event_name == 'push' && github.ref_name == 'main' && env.SONAR_TOKEN_SET == 'true'
91-
env:
92-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
93-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-
run: mvn -B verify -Pci -Djapicmp.skip=true org.sonarsource.scanner.maven:sonar-maven-plugin:5.0.0.4389:sonar -Dsonar.projectKey=kroxylicious_kroxylicious -pl ':kroxylicious-operator,:kroxylicious-parent'
9589
- name: Save PR number to file
9690
if: github.event_name == 'pull_request'
9791
run: echo ${{ github.event.number }} > PR_NUMBER.txt

0 commit comments

Comments
 (0)