我正在尝试将sonarqube集成到bitbucket管道,并在那里有以下代码
- pipe: sonarsource/sonarqube-scan:1.0.0
variables:
SONAR_HOST_URL: ${SONAR_HOST_URL}
SONAR_TOKEN: ${SONAR_TOKEN}
- pipe: sonarsource/sonarqube-quality-gate:1.0.0
variables:
SONAR_TOKEN: ${SONAR_TOKEN}我正在犯错误
无法到达
SonarQube server $SONAR_HOST_URL
我首先尝试设置localhost:9000,它运行在我的本地服务器上,得到了这个错误,然后我给出了网站url,仍然得到相同的错误,
我该给SONAR_HOST_URL什么
如果有什么帮助,谢谢,
发布于 2022-04-28 06:39:03
无法到达
SonarQube server $SONAR_HOST_URL
意味着在CI环境中没有定义SONAR_HOST_URL。您希望使用Repository settings -> Repository variables添加主机url &Repository variables(确保为令牌设置了Secured复选框)。
主机网址应该是公开的。它不适用于localhost:9000,因为Bitbucket CI没有\方法连接到运行在本地开发框上的sonarqube服务器的实例。
https://stackoverflow.com/questions/69610850
复制相似问题