4

Jenkins如何跳过sonar执行CI

 2 years ago
source link: https://segmentfault.com/a/1190000040745185
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

我们公司采用jenkins+sonar 持续集成检测代码质量,最近架构组新增了很多代码扫描规则,导致很多后端服务或者前后端未分离项目CI不通过,要将所有sonar检测出来的问题修改完会花一些时间,影响到测试进度,为了临时处理这一问题,我们可以临时注释掉质量校验的stage脚本,跳过sonar检测。

跳过sonar检测

一、中断CI

首先选择你想要CI的项目,当启动CI之后点击“X”中断掉该CI流程

二、注释掉质量校验的stage脚本

进入“回放”,注释掉“质量门禁”stage脚本,然后点击底部“运行”重新CI

回放(replay:为了避免重复打开配置界面调整Pipeline脚本,Jenkins贴心的提供了Replay功能。打开任意一次执行历史,在左侧点击Replay按钮,即可复原该次执行所运行的Pipeline脚本,无论脚本来源是任务本身还是远程仓库


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK