JetBrains / TeamCity.SonarQubePlugin

A plugin for TeamCity server allowing you to configure and run SonarQube analysis from the CI
Apache License 2.0
53 stars 31 forks source link

Special characters are not handled correctly in generated CLI command #36

Closed boonen closed 7 years ago

boonen commented 7 years ago

Our SonarQube user has a password with special characters, but unfortunately the plugin does not put the SQ runner command line arguments in quotes. Therefore our builds fail with the following exceptions:

Command to test: C:\BuildAgent\plugins\sonar-plugin-agent\sonar-qube-runner\bin\sonar-runner.bat -Dproject.home=. -Dsonar.host.url=http://localhost -Dsonar.projectKey=mykey -Dsonar.projectName=myproject -Dsonar.projectVersion=1.0.0 -Dsonar.sources=mysources -Dsonar.tests=MyTest -Dsonar.password=passwrord;withspeci@l>characters! -Dsonar.login=myuser

A simple solution would be to put all SQ parameter values in double quotes (I can apply a fix via a PR).

Linfar commented 7 years ago

@boonen What plugin version and what java version on agent do you use?

boonen commented 7 years ago

We use the plugin version from https://teamcity.jetbrains.com/viewLog.html?buildId=879040&tab=artifacts&buildTypeId=TeamCityPluginsByJetBrains_TeamCitySonarQubePlugin_Build and Oracle Java 1.8.0 (update 66). In TC's admin dashboard it is displayed as version 34.

However, I now see that there is a separate plugin build for TC 10, so I don't know if that will solve our issue. I'll try right now and keep you informed.

boonen commented 7 years ago

@Linfar It seems that the TC10 version fixed the problem. Now the listed plugin version is 116. Sorry for bothering you.