I am looking for options to get the git pull request details dynamically when sonarcloud is integrated with teamcity.
Currently, I am passing the values directly using the parameters like -Dsonar.pullrequest.base=master -Dsonar.pullrequest.branch=sonar_test -Dsonar.pullrequest.key=2 -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.repository=calculator
but I want these values to be pulled dynamically when any new pull request is happened in Github.
We are working on the scanner auto-configuration thanks to introspection of the CI environment variables. The support of TeamCity is not planned yet. However just to check the feasibility, could you share the env variables that are available on your builds, for both regular builds and pull requests?
I am not using any env variables as of now… All I am using is sonar cmds which are provided by sonarcloud at the time of configuration… I am just checking how can these parameters be passed into the teamcity build job dynamically by storing these values in teamcity parameters…
Okay… What about the Pull Request branch and Pull Request Key ? How can I get those values dynamically. Because If I don’t provide those details… The teamcity build runs the job but in the SonarCloud it is not showing any information about the respective job for which I have not provided the Pull Request Key or branch name…