Sharing common declarative pipeline parameters

8 views
Skip to first unread message

Matt Stave

unread,
May 18, 2017, 8:44:03 AM5/18/17
to Jenkins Users
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
Reply all
Reply to author
Forward
0 new messages