Hi ,
I used this following ; my first part itself is not working where i want to
save the return values from my first stage and use them in second stage.
i tried several methods none worked. my first stage job just echo " 123
234 345" ; i tried setting environment variable also setenv versions="123
234 345" echo $versions
// Powered by Infostretch
env.BAR=123
timestamps {
node ('mem1') {
stage ('Team/getactivebranch - Build') {
// Shell build step
def job = build job: '/Team/getactivebranch/' , parameters: []
env.BAR=321
}
def checklog2 = job.rawBuild.log
println (checklog2)
}
}
echo "env.BAR is '${BAR}'"
// Powered by Infostretch
env.BAR=123
timestamps {
node ('mem1') {
stage ('Teamgetactivebranch - Build') {
// Shell build step
def job = build job: '/Team/getactivebranch/' , parameters: []
env.BAR=321
}
println (job.getResult())
}
}
echo "env.BAR is '${BAR}'"
// Powered by Infostretch
env.BAR=123
timestamps {
node ('mem1') {
stage ('Team/getactivebranch - Build') {
// Shell build step
def j1BuildResult = build job: '/Team/getactivebranch/' , parameters: []
env.BAR=321
}
def j1EnvVariables = j1BuildResult.getBuildVariables();
println (j1EnvVariables)
}
}
echo "env.BAR is '${BAR}'"
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/c8ec711c-2e0c-4334-9e3d-73f0b4e7ae02%40googlegroups.com.