Hello All,
Anyone knows how to edit a variable from shell and recover the result
across each next shells.
I'm trying to get the git tag version and to push the value into an env
variable.
In next, I'd like to re use the value into the next cmd shell.
It doesn't work!
Anyone has an idea? I worked more than 2 days to trying to fix it.
stage('Build image') {
steps {
sh 'TAG=$(git describe --candidate=1 --tags)'
sh 'TAG=$(echo $TAG | cut -d\'-\' -f 1)'
sh 'WEB_IMAGE_NAME=' + env['ACR_LOGINSERVER'] +
'/my-project-1499882073260/test:' + env['TAG']
sh 'sudo docker build -t ${WEB_IMAGE_NAME} -f
WebApplication/WebApplication1/Dockerfile WebApplication/.'
}
}
--
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/8effa089-07c3-4918-afdd-858513ef13cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.