I have a maven project where I define a groovy system (I need access to the
jenkins DOM) post build step. In this step I need to read the POM__VERSION
parameter modify it and export it as a new env. variable that can be used
in the following build steps. Notice that configuring a shell post step
that does:
echo "pom-version" ${POM_VERSION}
works fine.
Now in the groovy system build step:
https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin
I have tried the following without success (null in all cases):
1)
println System.getProperty('POM_VERSION')
2)
def foo = build.buildVariableResolver.resolve("POM_VERSION")
println "POM_VERSION=$foo"
3)
def env = System.getenv()
println env["POM_VERSION"]
How do I read the POM_VERSION variable from the maven build step?
--
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].
For more options, visit https://groups.google.com/d/optout.