// 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}'"
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