Reputation: 33
I currently have a MultiJob (https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin) which kicks off a series of build phases. What I want to do is start the MultiJob on one node but then run the next two build phases on a selected amount of nodes.
Using the NodeLabel plugin (https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin) lets me specify the desired nodes and pass them to my build steps but selecting multiple nodes also causes the MultiJob to run multiple times. Is there an easy way to pass parameters but restrict where the overall MultiJob runs? Using a NodeLabel ignores the "Restrict where this project can be run" flag.
If there isn't a way to do this on the MultiJob itself my second plan is to have a job where you select nodes, populate a settings file, trigger the MultiJob on one node, and then have all build phases read the settings file from a known location to run their nodes.
Upvotes: 1
Views: 1002
Reputation: 1248
Use groovy plugin and scripts to select Multijob phase. For doing this you should also need to install Multijob plugin jenkins.
It provide many options to pass your node or any parameters.
you can restrict or allow specific Multijob phase by using these plugins.
Upvotes: 2