Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sonar report build on PR #15715

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/build-sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ jobs:
**/target/surefire-reports/*

- name: Sonar Report on PR
# For whatever reason we get PR 69 for develop branch with both head and base as develop.
if: ${{ github.event.workflow_run.pull_requests[0].head.ref != github.event.workflow_run.pull_requests[0].base.ref }}
if: ${{ github.event_name == 'pull_request' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
Expand All @@ -81,12 +80,12 @@ jobs:
-Pcoverage,templates
-Dmaven.wagon.http.retryHandler.count=3
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dsonar.pullrequest.key=${{ github.event.workflow_run.pull_requests[0].number }}
-Dsonar.pullrequest.branch=${{ github.event.workflow_run.pull_requests[0].head.ref }}
-Dsonar.pullrequest.base=${{ github.event.workflow_run.pull_requests[0].base.ref }}
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}

- name: Sonar report
if: ${{ github.event.workflow_run.pull_requests[0].head.ref == github.event.workflow_run.pull_requests[0].base.ref }}
if: ${{ github.event_name == 'push' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
Expand Down
Loading