如何取消詹金斯构建队列中的作业,这是不詹金斯​​通过REST API开始,并在其构建的队列 [英] how to cancel build queue jobs in jenkins, which are not started by jenkins and are in its build queue through REST API

查看:626
本文介绍了如何取消詹金斯构建队列中的作业,这是不詹金斯​​通过REST API开始,并在其构建的队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何取消建造队列的作业通过REST API詹金斯,这是不詹金斯​​开始,在其构建的队列。我知道如何与下面的命令 - 卷曲-X POST /作业取消正在进行的工作/// doDelete

how to cancel build queue jobs in jenkins through REST API, which are not started by jenkins and are in its build queue. I know how to cancel the in-progress job with below command- curl -X POST /job///doDelete

推荐答案

要在队列中取消作业,可供您参考:

To cancel a job in the queue, you can POST:

http://jenkins/queue/cancelItem?id=x

要找到X,你可以分析的结果:

To find x, you can parse the result of:

http://jenkins/queue/api/json?tree=items[id,task[name]]

要取消构建正在进行中:

To cancel a build that is in progress:

http://jenkins/job/<jobName>/y/stop

要找到Y,你可以分析的结果:

To find y, you can parse the result of:

http://jenkins/job/<jobName>/lastBuild/api/json?tree=building,number

这篇关于如何取消詹金斯构建队列中的作业,这是不詹金斯​​通过REST API开始,并在其构建的队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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