Hi,
How can I access the values of the parameters provided by "Maven Metadata Plugin" in the Jenkins pipeline Groovy script?
I created a job with two parameters:
Name Type
------------- -------------
SomeStr String Parameter
SomeArtifact List maven artifact versions
Pipeline Groovy script:
node {
// This is OK
println 'SomeStr: ' + SomeStr
// These DON'T WORK
println 'SomeArtifact: ' + SomeArtifact
println 'SomeArtifact: ' + SomeArtifact_VERSION
println 'SomeArtifact: ' + System.getenv('SomeArtifact')
println 'SomeArtifact: ' + System.getenv('SomeArtifact_VERSION')
}
While the value of SomeStr is printed correctly, none of the above attempts work for the SomeArtifact property. I tried it with and without Groovy Sandbox as well, but no luck.
Versions: Jenkins 2.14, Maven Metadata Plugin for Jenkins CI server 1.4.1, Pipeline 2.1
?
--
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-use...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/3cbf93e4-9956-42eb-982c-2cc0b61458f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
String version = currentBuild.rawBuild.getAction(hudson.model.ParametersAction).getParameter("COMPONENT").version