Thanks Jesse, that solved the problem.

labelExpression = ((AbstractProject)run.getParent()).getAssignedLabelString()

:thumbup:

On Fri, Aug 10, 2018 at 6:50 AM, Jesse Glick <[email protected]> wrote:

> On Thu, Aug 9, 2018 at 2:44 PM Gary Yao <[email protected]> wrote:
> > actually build is instanceof hudson.model.Run
>
> Of course—that is the defined supertype. I noted that you must check
> an `instanceof` expression to see if it is not a Pipeline build (which
> would work entirely differently).
>
> > What kind of method should I be looking for?
>
> http://javadoc.jenkins.io/hudson/model/AbstractProject.
> html#getAssignedLabelString--
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CANfRfr0D6w4YOwjZKtmjDObrdE4ASfW6zjKeSysdtRzj%3DLoZYA%
> 40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAN0iBD5SqwmKhmC_Zme03VPRe9YDAneXo7rLutLDgqCBLStm%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to