This should get you started:
https://github.com/jenkinsci/workflow-cps-global-lib-plugin#pipeline-global-library

> On 04.07.2016, at 11:49, Jonathan Hodgson <[email protected]> wrote:
> 
> Hi,
> 
> I'm still very new to groovy, so please forgive me if the answer to this 
> seems obvious.
> 
> In my pipeline project, there are things I want to do at the start of every 
> node, so they would look something like
> 
> 
> node {
>     do_common_stuff
>     build_project
> }
> 
> 
> node {
>     do_common_stuff
>     test_project
> }
> 
> 
> 
> Rather than adding "do_common_stuff" to every node, is it possible to extend 
> node so that I simply write
> 
> myNode {
>     build_project
> }
> 
> 
> myNode {
>    test_project
> }
> 
>     
> and the do_common_stuff is executed before the content in the {} brackets?
> 
> -- 
> 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/65448277-507f-44b7-bf8f-e95feb38eed2%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/EE4B3215-D274-419E-8B57-BC475D8DE6BB%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to