configure sonar in bamboo

故事扮演 提交于 2019-11-30 20:06:10

问题


I want to add a build step in Bamboo in order to analyze code using sonarqube. I do not want to use any plugin like Sonar for Bamboo but wondering if it is possible to write a script as a build step in order to run sonar. I have downloaded sonarqube on our build server and it is up and running having logged in as admin.

When I had setup locally, I installed sonar scanner and generated the MSBuild script which I ran from the project root folder but since it is a build server and I do not have the source code on the server I can't do that and I exploring the ways it can be integrated with Bamboo without using a plugin/addon.

Any help on this is greatly appreciated


回答1:


  1. Add your repository to the plan
  2. Add source code checkout step in the job
  3. add bash or cmd command step to cd ${bamboo_build_working_directory} and execute your sonar script or pass bamboo_build_working_directory as an argument to your sonar script. bamboo_build_working_directory will be replaced with source code root.


来源:https://stackoverflow.com/questions/52277511/configure-sonar-in-bamboo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!