remove nodes from job

25 views
Skip to first unread message

Kaushal Shriyan

unread,
Aug 8, 2016, 10:57:47 PM8/8/16
to Jenkins Users
Hi,

Is there a way to remove node config for a particular job? for example i have the job by the name smstask and there are 4 tomcat servers tomcat1,2,3 and 4
and is there a way to uncheck tomcat 3 and 4 when i execute the job smstask. In short smstask job will deploy only on tomcat1 and 2 and not on tomcat 3 and 4

Any help will be highly appreciable.

Regards,

Kaushal

mosh...@gmail.com

unread,
Aug 9, 2016, 8:10:28 AM8/9/16
to Jenkins Users

Here is how you can restrict a job to run on a specified set of nodes

1. Go to "smstask" job's configuration
2. Search "Restrict where this project can be run" checkbox and check it
3. In "Label Expression" that shows up, enter the labels of the nodes on which you would like to restrict "smstask" job to run. In this cases 'tomcat1' and 'tomcat2'. 
4. Save the configuration

Björn Pedersen

unread,
Aug 9, 2016, 12:11:04 PM8/9/16
to Jenkins Users
Hi,

a bit more details would have been fine. I guess you are using a multi-configuration job.
Probably take a look at https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin

Alternativly,  add a parameter with allowed label (possibly using one of the advance Param plugins likehttps://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+plugin )
and use this value in the labels field.


Björn

Mark Waite

unread,
Aug 9, 2016, 12:25:53 PM8/9/16
to Jenkins Users
The "platform labeler plugin" automatically labels agents for operating system name and version ("Ubuntu", "windows", "Debian 8.0", etc.)

The implied labels plugin allows me to create labels based on boolean combinations of other labels (like "old-git" is defined as "CentOS || RedHatEnterpriseServer").

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/932e7717-f558-4f80-a82d-ef2822dfc65b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages