Groovy post build script trigger another project by name

14 views
Skip to first unread message

Wender Oliveira

unread,
May 4, 2018, 6:26:00 PM5/4/18
to Jenkins Users
I would to like to create a logical Groovy script which in accord with some conditions trigger build  another project found by job name

def build = manager.build;

if(manager.build.getResult() == Result.SUCCESS){
   nivel
= build.getBuildVariables().get("nivel");

   
if(matcher != null && nivel == "completo"){
     
//Here I would to get a Job by name
     
//And build the job name
   
}          
}


Reply all
Reply to author
Forward
0 new messages