Created
July 14, 2020 13:35
-
-
Save queil/2362be4c2452ea6d8da21ad22d5eae36 to your computer and use it in GitHub Desktop.
Jenkins: run all the jobs matching a regex
This file contains 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 characters
// This can be executed in the master node script console | |
Jenkins.instance.getAllItems(AbstractItem.class) | |
.findAll {job -> job.fullName.matches("^(a|b).*/master")} | |
.each { job -> | |
def actions = [new CauseAction(new Cause.UserIdCause()), new ParametersAction(new BooleanParameterValue("X", true))] as Action[] | |
job.scheduleBuild2(0, actions) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment