Reputation: 397
I want to get the description of build parameters of a Jenkins build using groovy.
I want to include this description in an email using by Email-ext plugin groovy templates.
Is there some way I can achieve this?
Upvotes: 0
Views: 1378
Reputation: 14782
See Parameterized System Groovy script:
...
// get parameters
def parameters = build?.actions.find{ it instanceof ParametersAction }?.parameters
parameters.each {
println "parameter ${it.name}:"
println it.dump()
println "-" * 80
}
...
Note: Since Actionable.getActions()
is deprecated allActions
should be used instead of actions
.
Add:
println "${it.description}"
and there you are.
Upvotes: 3