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

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -