Configuration
Configure the Sonar™Scanner as described in the SonarQube™ Wiki.
See the official Sonar™Scanner example projects for inspiration
Add a Sonar™ Scanner task to your Bamboo job
For test coverage in SonarQube™ with Sonar™Scanner, please pass the required parameters to specify the path to the coverage reports as described in the SonarQube™ Wiki.
...
Define a remote agent capability for the Sonar™Scanner CLI Docker image:
Go to Bamboo > Agents > Shared Remote Capabilities
Create a new capability of type
Custom
with keydocker-sq-scanner
and value/opt/sonar-scanner
Create a new Bamboo job for the SonarQube™ analysis and use the Docker image
sonarsource/sonar-scanner-cli:latest
:d. Add the Sonar™Scanner task configuration, and choose for the field
SonarQube™Scanner executable
the valuedocker-sq-scanner
Run the Bamboo job, and the analysis should work fine.
If you experience any errors like JGit
Failed to find all committed files
, make sure you follow the troubleshooting advice below.
...
Info | ||
---|---|---|
Remote AgentsIf you use Sonar™Scanner task on a remote agent, set the capability by either a) adding a Sonar™Scanner capability to your remote agent in the Bamboo UI, see above b) or add the following key/value pair to your
|
...