Didn't notice the visibility of Jenkins#trimLabels() -- But when it's about use 
in script, Groovy's rules are weird anyway.

My other suggestion to use Label.reset() works however: Jenkins#trimLabels() is 
mostly the same as `Jenkins.instance.labels.each { it.reset() }`, which works 
for me from Script Console. More targeted resetting can be done by checking 
whether the label you're processing is one of the labels affected by your rules.

On 11.05.2014, at 10:06, Christian Goetze <cg.software.des...@gmail.com> wrote:

> Sadly, the trimLabels() method is private. Is there a public method to 
> achieve this, or do I really need to call setNodes(getNodes())
> 
> On Friday, May 9, 2014 12:48:41 PM UTC-7, Daniel Beck wrote:
> I commented on the issue with an explanation and how to solve your problem. 
> 
> On 09.05.2014, at 21:40, Christian Goetze <christia...@appdynamics.com> 
> wrote: 
> 
> > I just filed https://issues.jenkins-ci.org/browse/JENKINS-22954 
> > 
> > It appears that if I change the node label string via groovy, that change 
> > is not immediately effective, even if I save the model. 
> > 
> > If I launch a subtask from the task that make the label change, that 
> > subtask will run on a node where it should not run. 
> > 
> > Is there some call I am missing to make a label change to the nodes be 
> > effective? 
> > 
> > -- 
> > 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. 
> > For more options, visit https://groups.google.com/d/optout. 
> 
> 
> -- 
> 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-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to