Is it possible to delete a hudson job programmatic

2019-06-16 21:13发布

I can create jobs using /createItem?name=JOBNAME, but cant find anything in the docs about deleting jobs.

标签: hudson
2条回答
迷人小祖宗
2楼-- · 2019-06-16 21:30

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
查看更多
干净又极端
3楼-- · 2019-06-16 21:36

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.

查看更多
登录 后发表回答