I use Jenkins,I can't find "Restrict where this project can be run" in the configure page,should I add some plugins? which one?
Set the "Restrict where this job can be run" check box in your job configuration and specify the name of your slave. If you add more slaves later, you can set labels for each slave and specify those in your job configs. See this reference documentation: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds.
In test_job's configuration, select 'This build is parameterized' and add a Node parameter and set the parameter name to node_name. In pipeline add Choice parameter, name it node , put there possible choices, so running pipeline you can choose on which node it should be run.
Save the Job Configuration and Build the Job according to your requirement. Step 1− If multi node selection was enabled, you get the chance to select multiple nodes to run the job on. The job will then be executed on each of the nodes, one after the other or concurrent - depending on the configuration.
Freestyle jobs The plugin provides a build wrapper (Delete workspace before build starts) and a post build step (Delete workspace when build is done). These steps allow you to configure which files will be deleted and in what circumstances. The post build step can also take the build status into account.
This is because you have not yet added any new nodes to your Jenkins set up. Till then the master(where you have installed Jenkins) is the only available machine where jobs can be run. So there is no need to ask where the job needs to be restricted to be run.
Check this link to see how to add a new node to your jenkins setup. Once you add a new node, you will see the option of "Restrict where this project can be run".
This is because you have not added any label to your master node (if you don't have slaves).
This is a bit weird because you could also use the node name (i.e. 'master') to restrict the executor node, not only the label, and you may want to do this before you add further slaves.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With