在竹子中配置声纳 [英] configure sonar in bamboo

查看:12
本文介绍了在竹子中配置声纳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Bamboo 中添加一个构建步骤,以便使用 sonarqube 分析代码.我不想为 Bamboo 使用像 Sonar 这样的插件,但想知道是否可以编写脚本作为构建步骤来运行声纳.我已经在我们的构建服务器上下载了 sonarqube,并以管理员身份登录并运行.

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.

当我在本地进行设置时,我安装了声纳扫描仪并生成了我从项目根文件夹运行的 MSBuild 脚本,但由于它是一个构建服务器并且我在服务器上没有源代码,所以我不能这样做我正在探索如何在不使用插件/插件的情况下将它与 Bamboo 集成.

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. 将您的存储库添加到计划中
  2. 在作业中添加源代码签出步骤
  3. 将 bash 或 cmd 命令步骤添加到 cd ${bamboo_build_working_directory} 并执行您的声纳脚本或将 bamboo_build_working_directory 作为参数传递给您的声纳脚本.bamboo_build_working_directory 将替换为源代码根目录.
  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.

这篇关于在竹子中配置声纳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆