Tuesday, October 1, 2013

Add label expressions in Jenkins to restrain which servers a build may run upon.

Where you spec the specifications for a build in Jenkins there will be a place to add Label Expressions where you may add a series of string values like so:

nodejs && grunt

 
 

At the home page of Jenkins you should see a list of servers at the lower left. If you click on one and then click "Configure" at the server's summary you will get another configuration screen. Herein there will be a fill-in-the-blank field for "Labels" and here too you may add string values. This time you will just separate the strings with spaces however. Match values at a build configuration's "Label Expressions" up to values here to restrain the possible servers a build may be built upon. Jenkins may randomly run a build on any server in the list without you restraining its choices in this way.

No comments:

Post a Comment