Download and install: https://github.com/jenkinsci/purge-job-history-plugin
This plugin provides the ability to purge all the build records of a job either via a CLI command or via the UI. When this plugin is installed it adds a new action to all Jobs with builds.
You can either use UI as shown here (https://github.com/jenkinsci/purge-job-history-plugin) to purge any/all of the following:
- Job
- Pipeline
- MultiBranch Job (Recursive Flag is Needed)
- Jobs under a Folder (Recursive Flag is Needed)
- All Job under Jenkins Instance (Recursive Flag is Needed)
Or you can do it via Command line using this command:
java -jar jenkins-cli.jar -s http://localhost:8080/jenkins purge-job-history <JobName> -r
JobName: Name of the Job whose history you would like to purge
r: To reset the next build number to 1
Note* you need super access to perform it.
Comments
Post a Comment