首页 > 代码库 > Build step 'Execute Windows batch command' marked build as failure

Build step 'Execute Windows batch command' marked build as failure

坑爹的Jenkis,在执行windows命令编译.NET项目的时候命令执行成功了,但是却还是报了这样一个错:

Build step ‘Execute Windows batch command‘ marked build as failure

综合了几个stackoverflow上的答案,原因如下:

jenkins执行windows命令,若退出代码不为0 ,则jenkins会将构建标记为失败

我解决的方法:在bat脚本最后一行加上 exit 0

 

Build step 'Execute Windows batch command' marked build as failure