jenkins delete cache code example
Example 1: how do i clear jenkins cache using jenkinsfile
def jobName = "python-devops"
def job = Jenkins.instance.getItem(jobName)
job.getBuilds().each { it.delete() }
job.nextBuildNumber = 1
job.save()
Example 2: how do i clear jenkins cache using jenkinsfile
println(Jenkins.instance.pluginManager.plugins)