开发者

Is it possible to delete a hudson job programmatically via REST API?

开发者 https://www.devze.com 2023-03-08 00:45 出处:网络
I can create jobs using /createItem?name=JOBNAME, but cant find an开发者_开发知识库ything in the docs about deleting jobs.Discovered by looking into how the delete button does it that you can just pos

I can create jobs using /createItem?name=JOBNAME, but cant find an开发者_开发知识库ything in the docs about deleting jobs.


Discovered by looking into how the delete button does it that you can just post to joburl/doDelete a bit like this..

wget -qO- --post-data="anything" http://HOST/job/JOBNAME/doDelete > /dev/null


Go to <JobURL>/api/? You will get below text.

Delete a job

To programmatically delete this job, do HTTP POST to this URL.

DISCLAIMER: I tested it with Jenkins. But this should also work in Hudson.

0

精彩评论

暂无评论...
验证码 换一张
取 消