Skip to content

Commit

Permalink
Always download the latest sonar-scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
velomatt committed May 3, 2024
1 parent ffffb02 commit d622098
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion buildspec/sonar-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ phases:
- aws s3 cp --recursive "$DSSS3URI/cache/dss-sdk/$GITHUB_RUN_NUMBER/unit/df_out/reports/" df_out/reports/ --only-show-errors
# replace the old CODEBUILD_SRC_DIR with the current one in bw-output
- sed -i -r "s|/codebuild/output/src[^/]+/src/github.com/OpenMPDK/dss-sdk|$CODEBUILD_SRC_DIR|g" bw-output/build-wrapper-dump.json
# Download the latest sonar-scanner
- rm -rf /sonar-scanner*
- wget --no-verbose --content-disposition -E -c "https://search.maven.org/remote_content?g=org.sonarsource.scanner.cli&a=sonar-scanner-cli&v=LATEST&c=linux&e=zip"
- unzip -q sonar-scanner-cli-*.zip -d /
- rm -f sonar-scanner-cli*.zip
build:
commands:
# Run sonar-scanner and ingest coverage report(s)
- |
sonar-scanner \
/sonar-scanner-*-linux/bin/sonar-scanner \
-Dsonar.branch.name="$([[ "$GITHUB_REF_NAME" != *"/merge" ]] && echo "$GITHUB_REF_NAME")" \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.pullrequest.github.summary_comment=true \
Expand Down

0 comments on commit d622098

Please sign in to comment.