mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
.github: sonarcloud integration fixes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
c315724e76
commit
c379430dab
6
.github/workflows/coverage-check.yml
vendored
6
.github/workflows/coverage-check.yml
vendored
@ -85,13 +85,13 @@ jobs:
|
|||||||
id: coverage
|
id: coverage
|
||||||
if: steps.java-changes.outputs.any_changed == 'true'
|
if: steps.java-changes.outputs.any_changed == 'true'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ACS_ROBOT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
PR_ID: ${{ github.event.pull_request.number }}
|
PR_ID: ${{ github.event.pull_request.number }}
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
||||||
cd nonoss && bash -x install-non-oss.sh && cd ..
|
cd nonoss && bash -x install-non-oss.sh && cd ..
|
||||||
mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apachecloudstack -Dsonar.pullrequest.key=$PR_ID -Dsonar.pullrequest.base=main -Dsonar.pullrequest.branch=refs/pull/${{ github.event.number }}/merge
|
mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apachecloudstack -Dsonar.pullrequest.key=$PR_ID -Dsonar.pullrequest.base=main -Dsonar.pullrequest.branch=refs/pull/${{ github.event.number }}/merge -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub
|
||||||
|
|
||||||
echo "COVERAGE<<EOF" >> $GITHUB_ENV
|
echo "COVERAGE<<EOF" >> $GITHUB_ENV
|
||||||
for file in ${{ steps.java-changes.outputs.all_changed_files }}; do
|
for file in ${{ steps.java-changes.outputs.all_changed_files }}; do
|
||||||
@ -110,4 +110,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.ACS_ROBOT_TOKEN }}
|
token: ${{ secrets.ACS_ROBOT_TOKEN }}
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
body: "## PR Coverage Report\n|**CLASS**|**INSTRUCTION MISSED**|**INSTRUCTION COVERED**|**BRANCH MISSED**|**BRANCH COVERED**|**LINE MISSED**|**LINE COVERED**|\n|-----|-----|-----|-----|-----|-----|-----|\n${{ env.COVERAGE }}"
|
body: "## PR Analysis\nhttps://sonarcloud.io/summary/new_code?id=apachecloudstack&pullRequest=${{ github.event.pull_request.number }}\n## PR Coverage Report\n|**CLASS**|**INSTRUCTION MISSED**|**INSTRUCTION COVERED**|**BRANCH MISSED**|**BRANCH COVERED**|**LINE MISSED**|**LINE COVERED**|\n|-----|-----|-----|-----|-----|-----|-----|\n${{ env.COVERAGE }}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user