Here is another option: delete assemblies remotely using cURL. (Replace the beginning of the URL with what you use to access Jenkins with your browser.)
$ curl -X POST http://jenkins-host.tld:8080/jenkins/job/myJob/[1-56]/doDeleteAll
The above removes build # 1 - # 56 for job myJob.
If authentication is enabled on the Jenkins instance, you must specify the username and API token as follows:
$ curl -u userName:apiToken -X POST http://jenkins-host.tld:8080/jenkins/job/myJob/[1-56]/doDeleteAll
The API token must be retrieved from the / me / configure page in Jenkins. Just click the "Show API Token ..." button to display both the username and the API token.
Edit: as indicated by yegeniy in the comment below, you may have to replace doDeleteAll
with doDelete
in the URLs above to do this work depending on your configuration.
Erwan Legrand Mar 10 '14 at 14:41 2014-03-10 14:41
source share