Reputation: 305
Is there any way I can get any sonarqube api which can provide the build number of bamboo or any bamboo api which can give sonarqube info.This would really help.
I have so far tried both side but i am surprised both the system are quite clueless about each other. Why it is not possible that a build which ran sonarqube as as one of it's job doesn't have any information about that. Also neither in sonar it tell which build has actually triggered that sonar execution
Upvotes: 0
Views: 279
Reputation: 4767
(Not sure I understand what exactly you are looking for, perhaps this ...? )
I don't believe you can relate a specific Activity (SonarQube analysis) to a specific build (Bamboo), just project to job.
You must have SonarQube Server configured in Bamboo
When executing your job, you can add these sonar.links
optional parameters to the analysis step:
sonar.links.homepage
Project home page.
sonar.links.ci
Continuous integration.
and
sonar.links.scm
Project source repository.
sonar.links.issue
Issue tracker.
Maybe also specify sonar.host.url=$SONAR_HOST_URL
(where SONAR_HOST_URL
is the global setting in Bamboo) in the analysis step parameters.
Those populate the Project Overview page sidebar:
That should provide the links from SonarQube back to the other systems of interest.
If you have properly configured Bamboo, you should see a link in Bamboo to the SonarQube project, post execution.
Upvotes: 1