devops-exercises/challenges/jenkins/scripts/jobs_with_string.groovy

7 lines
145 B
Groovy
Raw Normal View History

2019-10-19 22:48:17 +02:00
def jobs = Jenkins.instance.items.findAll { job -> job.name =~ /"REMOVE_ME"/ }
jobs.each { job ->
println job.name
//job.delete()
}