Quantcast

Sharing common declarative pipeline parameters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sharing common declarative pipeline parameters

Matt Stave
It seems you can use
Library

in a declarative pipeline file to do stuff like

mySpecialPipeline {
     someString
= 'foo'
}


and have

pipeline { ...
...echo config.someString
}


in vars/mySpecialPipeline.groovy

and you can reference vars/myCustomStep.groovy

but is it possible to share job
parameters {}

?

My various attempts met with various errors about how I fail at closure-ing :)    Trying to reference the shared stuff inside the block yielded "parameter expected" kinda stuff, or "block not allowed here".

--- Matt

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8ece4b96-8550-4a83-9b85-1d37b2c8aa3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...