I have about 100 jobs on my hudson CI, possible to mass delete them ?
Go to project which you want to delete, in upper left frame, you can see delete (maven, if it is maven project) project. Show activity on this post. If this is a maven project then in the left side panel, you can see the option as delete maven project.
Open Jenkins project and click on configure to open configuration screen for the project. Locate the discard old builds checkbox. Select discard old builds checkbox to see more options. Type number of days to 10 or any other desired value.
The easiest way, IMHO, would be to use script. Go to http://your.hudson.url/script/
Delete jobs by running:
for(j in hudson.model.Hudson.theInstance.getProjects()) { j.delete(); }
And this way gives you an option to easily use condition to filter out jobs to delete.
FOR JENKINS
Current versions (2.x):
for(j in jenkins.model.Jenkins.theInstance.getAllItems()) { j.delete() }
Older versions:
for(j in jenkins.model.Jenkins.getInstance().getProjects()) { j.delete(); }
Just delete the job directories:
cd $HUDSON_HOME/jobs rm -rf <JOB_NAME>
See: Administering Hudson
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With