diff --git a/buildspec/sonar-scanner.yml b/buildspec/sonar-scanner.yml index 1335a81a..2925f1ea 100644 --- a/buildspec/sonar-scanner.yml +++ b/buildspec/sonar-scanner.yml @@ -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 \