Delete jenkins jobs having the matching pattern -
how delete jobs on jenkins having prefix "data_jobs_" ? , how disable jobs having prefix "data_jobs_server" ?
anyone know how going /script page ??
the following should work:
for (job in jenkins.model.jenkins.theinstance.getprojects()) { if (job.name.startswith("data_jobs_")) { job.delete() } else if (job.name.startswith("data_jobs_server")) { job.disable() } }
Comments
Post a Comment