Created
November 23, 2016 16:19
Revisions
-
nextrevision created this gist
Nov 23, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ import jenkins.model.* def matchedJobs = Jenkins.instance.items.findAll { job -> job.name =~ /job_regex_here/ } matchedJobs.each { job -> println job.name // without parameters //job.scheduleBuild(new Cause.UserIdCause()) // with parameters //def params = [new StringParameterValue('PARAM1', 'value1')] //job.scheduleBuild2(0, new Cause.UserIdCause(), new ParametersAction(params)) }