Hi i am using aws code build with sonar for bitbucket pull request decoration.... but i am not getting any comments on pull request....
aws codebuild logs....
[sonar4bitbucket] No open pull requests with source branch '' found. No analysis will be performed. ....
here is my aws code build command ....
sonar-scanner -Dsonar.branch=$GIT_BRANCH -Dsonar.bitbucket.branchName=$GIT_BRANCH -Dsonar.analysis.mode=issues -Dsonar.bitbucket.oauthClientSecret=secret -Dsonar.bitbucket.oauthClientKey=key -Dsonar.bitbucket.minSeverity=INFO -Dsonar.host.url=my server-url -Dsonar.bitbucket.teamName=teamname -Dsonar.bitbucket.repoSlug=myreponame -Dsonar.bitbucket.accountName=my-account-name -Dsonar.bitbucket.approvalFeatureEnabled=false -Dsonar.bitbucket.buildStatusEnabled=true
i think the problem is with these two properties i,e -Dsonar.branch=$GIT_BRANCH -Dsonar.bitbucket.branchName=$GIT_BRANCH
but i don't know how to get the values of these from aws code build environmental variables
(https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html)