0
votes

I have configured bamboo locally on my system. I have installed SonarQube plugin to it.

I have created a task for sonar-runner. I have a snapshot for that configuration:enter image description here

When I run the plan, the build fails. I have also attached the log for the build failure. It seems the error is here.

*Failing task since return code of [C:\sonar-runner-2.4\bin\sonar-runner -D sonar.login=admin -D sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 -D sonar.jdbc.username=sonar -D sonar.jdbc.password=****** -D was -1 while expected 0*

What may be the problem?

Thanks.

2

2 Answers

1
votes

Also check that your sonar.properties file can be found by the sonar-runner task, and that your configuration files for both sonar-runner and the properties file for your project can be found. Also I don't know if the space between the -D and the property you're passing in will work. Mine are configured like: -Dsonar.projectVersion=${bamboo.repository.branch.name} for example. You've also got an extra -D on the end that has no property.

0
votes

It seems the executable for sonar is not found by Bamboo. Check again your installation path.