Re: [workflow-plugin] How to reference workflow steps in a class?

2015-02-26 Thread Jesse Glick
On Wednesday, February 18, 2015 at 6:18:03 PM UTC-5, Jos Backus wrote:
>
> How does one reference workflow steps like sh and build from inside an 
> instance method? Using them unqualified yields a no method error.


 If you are using the global class library system, read

https://github.com/jenkinsci/workflow-plugin/blob/master/cps-global-lib/README.md#writing-shared-code

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/76fbc798-162f-43bb-906b-c587a8dd264b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [workflow-plugin] How to reference workflow steps in a class?

2015-02-19 Thread Jos Backus
I tried that as I saw someone else suggest that, but I could not get it to 
work. Then I found somewhere in the Github docs that this doesn't work, 
presumably because serializing Groovy classes isn't supported. So I ended up 
using a closure for the effect I was after, and that worked.

Thanks for trying to help! 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/471ad690-bb7a-40b2-9cb1-81aba91d64be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [workflow-plugin] How to reference workflow steps in a class?

2015-02-19 Thread Baptiste Mathus
Should/couldn't you pass this from the base context to your instance method
and then do something like ctx.sh in that method (with ctx=this when
creating your instance)
Le 19 févr. 2015 00:18, "Jos Backus"  a écrit :

> Hi,
>
> How does one reference workflow steps like sh and build from inside an
> instance method? Using them unqualified yields a no method error.
>
> Thanks,
> Jos
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/ba4ef6ef-80db-4530-b79a-321d518b66ce%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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5TgD%3DSFe2QQoDHqaumVYxwzxBHQ5ZS7V9NLfLuHxiHLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[workflow-plugin] How to reference workflow steps in a class?

2015-02-18 Thread Jos Backus
Hi,

How does one reference workflow steps like sh and build from inside an instance 
method? Using them unqualified yields a no method error.

Thanks,
Jos

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ba4ef6ef-80db-4530-b79a-321d518b66ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.