When we work with Jenkins, we surely run our project(s) multiple times and this will result in a long queue of the build History list that mostly is of no use after certain numbers. How to discard Jenkins old builds from project or Pipeline? 1) If you have access to the " Manage Jenkins " section of your Jenkins then you can run the below-mentioned script to clean your project Build History. Note* This will reset the build number to 1 on your next run. a) Access your Jenkins HP > Manage Jenkins > Script Console b) Copy-Paste this script to your Console Script text area and update the " myproject_name " with your project name where you need to clean the build history and hit the " Run button ". def yourJobName = "myproject_name" def job = Jenkins.instance.getItem(yourJobName) job.getBuilds().each { it.delete() } job.nextBuildNumber = 1 job.save() This should clean your Build History for that particular project but if you...
A blog about my testing stories where I pen down my thoughts about test automation covering primarily Selenium, Java, Rest Assured, Karate, Maven, TestNG, Postman, newman, Jenkins, Git, Azure DevOps, etc.