如何使Jenkins的工作状态被终止 [英] How to make a Jenkins job status as aborted

查看:817
本文介绍了如何使Jenkins的工作状态被终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一些批处理命令作为构建的预构建步骤.我想根据某些情况将构建的状态设为已中止.

I am running some batch commands as a prebuild step for a build. I want to make the status of the build as aborted based on some conditions.

有人可以告诉我詹金斯中堕胎"的错误等级是什么吗?

Can anyone tell me what is the errorlevel for 'aborted' in Jenkins?

推荐答案

您必须安装"条件构建步骤插件和"

You have to install the "Conditional build step plugin" and the "Fail the build" plugins. Then you simply add a conditional step, and if the condition is true, you can call the fail build step with state "aborted".

这篇关于如何使Jenkins的工作状态被终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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