I have just installed the Sonar for Bamboo plugin, and have trouble getting it to work.
I have followed the steps on https://mibexsoftware.atlassian.net/wiki/spaces/MSS/pages/1339883529/Getting+started+with+Sonar+for+Bamboo to the best of my abilities, but when I try to run the build, the Sonar Gradle task fails with the following, not very descriptive reply:
15-May-2020 11:05:02 Starting task 'SonarQube' of type 'ch.mibex.bamboo.sonar4bamboo:sonar4bamboo.gradletask'
15-May-2020 11:05:02 SONAR4BAMBOO: No branch target found, will not configure sonar.branch.target.
15-May-2020 11:05:02
Beginning to execute external process for build 'Project - Module - Build and Unit tests #71 (PRO-MOD-JOB1-71)'
... running command line:
./gradlew sonarqube --info -Dsonar.host.url=http://localhost:9000 -Dsonar.login=****** -Dsonar.password=****** ... in: /var/atlassian/application-data/bamboo/xml-data/build-dir/PRO-MOD-JOB1
... using extra environment variables:
[Long list of environment variables]
15-May-2020 11:05:02 Failing task since return code of [./gradlew sonarqube --info -Dsonar.host.url=http://localhost:9000 -Dsonar.login=****** -Dsonar.password=****** was -1 while expected 0
15-May-2020 11:05:02 SONAR4BAMBOO: was not able to find a SonarQube result URL
15-May-2020 11:05:02 Finished task 'SonarQube' with result: Failed
My environment setup is that I have Bamboo and SonarQube running on the same server on different ports. SonarQube is running in a Docker Container that is accessible via port 9000, and I can successfully log in to its web interface, so I can say for sure that it's accessible.
However, I have no idea why the Sonar Gradle build step fails, primarily because apart from the above lines no error is generated, so I don't have any idea what could be wrong here.
Any advice on this would be greatly appreciated.