I'd say you're trying to use JavaBean on something that's not.
Also, see my previous answer earlier, it somehow smells a bit too
programmatic. Ideally try not do only *very* basic programming in Pipeline,
do like most if not all magical/nice Groovy features don't exist.


Le 25 août 2017 11:46, "red 888" <[email protected]> a écrit :

Yup "myFunc.myDerp" works! So is this a groovy thing or is this part of the
jenkins DSL? I tried googling, but not sure what this language feature is
called.


On Friday, August 25, 2017 at 1:54:38 PM UTC-4, David Karr wrote:

> You likely need to reference "myFunc.myDerp" instead.
>
> On Fri, Aug 25, 2017 at 10:33 AM, red 888 <[email protected]> wrote:
> > Im not sure if this is a groovy thing or a jenkins shared library DSL
> thing
> > but I don't understand how this automatic getter setter stuff works.
> >
> > I have this shared lib:
> > /vars/myFunc.groovy
> >
> > I have this in it:
> > def getDerp() { return something }
> > def getHerp() { return something }
> >
> > Now in my jenkinsfile I can reference it like this:
> > echo myFunc.derp
> > echo myFunc.herp
> >
> > But I tried naming my methods like this:
> > def getMyDerp() { return something }
> > def getMyHerp() { return something }
> >
> > Now in my jenkinsfile I tried to do this:
> > echo myFunc.myderp
> > echo myFunc.myherp
> >
> > But that didn't work.
> >
> > I'm just curious how this works and if its possible to do method names
> like
> > getExtraHumps.
> >
> >
> > --
> > 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 [email protected].
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/jenkinsci-users/96c6a471-
> a94c-4fc8-b3a8-d9ea95f26be4%40googlegroups.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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/
msgid/jenkinsci-users/6a901e11-309c-4cba-b3a9-1f3ef274280f%40googlegroups.
com
<https://groups.google.com/d/msgid/jenkinsci-users/6a901e11-309c-4cba-b3a9-1f3ef274280f%40googlegroups.com?utm_medium=email&utm_source=footer>
.

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6JWXvc6342ZOWFFbTT08mDwjfvbbF5MU8KzL6EuuB1xg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to