hudson CI: how to delete all jobs?

前端 未结 4 762
死守一世寂寞
死守一世寂寞 2020-12-28 15:43

I have about 100 jobs on my hudson CI, possible to mass delete them ?

4条回答
  •  清酒与你
    2020-12-28 16:06

    You can programmatically use the XML api (or use the JSON flavor if you prefer that):

    http://your.hudson.url/api/xml?xpath=//job/name&wrapper=jobs
    

    Returns:

    
        firstJob
        secondJob
        
    
    

    Now iterate over the job names and do a post request to

     http://your.hudson.url/job/your.job.name/doDelete
    

    (You can do this with any programming language you like that supports XML and HTTP)

提交回复
热议问题