📜  我如何使用 jenkinsfile 清除 jenkins 缓存 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:47.758000             🧑  作者: Mango

代码示例1
def jobName = "python-devops"  
def job = Jenkins.instance.getItem(jobName)  
job.getBuilds().each { it.delete() }  
job.nextBuildNumber = 1   
job.save()