Skip to content

Commit

Permalink
[MGDSTRM-6791] Fix Sonar Maven commands, remove unnecessary secrets (#…
Browse files Browse the repository at this point in the history
…218)

Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar authored Jul 28, 2022
1 parent 73026df commit 9578885
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/sonar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,12 @@ jobs:
if: github.event.workflow_run.event == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_ORG: ${{secrets.SONAR_ORG}}
SONAR_PROJECT: ${{secrets.SONAR_PROJECT}}
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
run: |
mvn -B --no-transfer-progress org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.organization=${SONAR_ORG} \
-Dsonar.projectKey=${SONAR_PROJECT} \
-Dsonar.login=${SONAR_TOKEN}
-Dsonar.projectKey=bf2fc6cc711aee1a0c2a_kafka-admin-api \
-Dsonar.login=${SONAR_TOKEN} \
-Dsonar.coverage.jacoco.xmlReportPaths=$(pwd)/systemtests/target/site/jacoco-aggregate/jacoco.xml \
-Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} \
-Dsonar.pullrequest.key=${{ fromJson(steps.build_context.outputs.content).event.number }} \
-Dsonar.pullrequest.branch=${{ fromJson(steps.build_context.outputs.content).head_ref }} \
Expand All @@ -116,13 +114,11 @@ jobs:
if: github.event.workflow_run.event == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_ORG: ${{secrets.SONAR_ORG}}
SONAR_PROJECT: ${{secrets.SONAR_PROJECT}}
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
run: |
mvn -B --no-transfer-progress org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.organization=${SONAR_ORG} \
-Dsonar.projectKey=${SONAR_PROJECT} \
-Dsonar.login=${SONAR_TOKEN}
-Dsonar.projectKey=bf2fc6cc711aee1a0c2a_kafka-admin-api \
-Dsonar.login=${SONAR_TOKEN} \
-Dsonar.coverage.jacoco.xmlReportPaths=$(pwd)/systemtests/target/site/jacoco-aggregate/jacoco.xml \
-Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} \
-Dsonar.branch.name=${{ github.event.workflow_run.head_branch }}

0 comments on commit 9578885

Please sign in to comment.