devops-exercises/topics/cicd/solutions/remove_jobs_solution.groovy
abregman 99c4e02ecf Rename exercises dir
Name it instead "topics" so it won't be
strange if some topics included "exercises" directory.
2022-08-02 01:53:56 +03:00

7 lines
140 B
Groovy

def jobs = Jenkins.instance.items.findAll { job -> job.name =~ /"test"/ }
jobs.each { job ->
println job.name
//job.delete()
}