在我们的CI环境中,我们目前有一个构建服务器(基于Atlassian Bamboo)和两个SonarQube实例(版本6.0和6.5)。最初,我们的CI服务器被配置为与6.0 SonarQube实例进行通信。这在/home/bamboo/.gradle/gradle.properties
文件中已经配置了CI服务器上是这样的:在Gradle Build中配置多个SonarQube实例
systemProp.sonar.host.url=<http url of SonarQube 6.0 instance>
systemProp.sonar.login=<username here>
systemProp.sonar.password=<password here>
现在,我们有我们的CI服务器上运行的另一个基于摇篮-项目,应聊到新SonarQube 6.5实例。我试着配置这个,但一直失败。
事情我迄今所做的:
添加命令行参数来摇篮包装命令: 我曾尝试加入-Dsonar.host.url=
,-Dsonar.login=
,-Dsonar.password=
到摇篮命令。由于这看起来不起作用,我还尝试使用-DsystemProp.sonar.host.url=
,-DsystemProp.sonar.login=
,-DsystemProp.sonar.password=
将命令行参数设置为SonarQube系统属性。这也没有用。
添加的属性到的build.gradle文件 - 增加属性的build.gradle
文件是这样的:
sonarqube {
properties {
property "sonar.host.url", "<http url of SonarQube 6.0 instance>"
property "sonar.login", "<username here>"
property "sonar.password", "<password here>"
...<other SonarQube analysis settings here>...
}
}
在所有情况下,CI服务器聊到了错误SonarQube实例(6.0)。我的问题是,是否可以将单个项目配置为与另一个SonarQube实例对话。如您所见,我们使用Gradle 3.2.1作为构建工具。我们也使用org.sonarqube Gradle插件。
谢谢你的帮助。
安德烈