| See the following:
podTemplate(label: 'x', inheritFrom: 'JenkinsDeployer', nodeUsageMode: 'EXCLUSIVE') {
node('x') {
echo env.environment
podTemplate(label: 'y', inheritFrom: 'JenkinsLiveDeployer', nodeUsageMode: 'EXCLUSIVE') {
node('y') {
echo env.environment
}
}
}
}
Assuming there are pod templates for a 'JenkinsDeployer' which have a set of environment variables and then a pod template for 'JenkinsLiveDeployer', which has a different set of environment variables, then I would expect to see a different value for each echo statement. Right now, assuming environment on each pod template are respectively pre-production and and production, the actual result of the code snippet above is:
// node starting
'pre-production'
// node starting
'pre-production'
|