I'm on a plane right now so can't find it, but there's an open ticket for this and we'll be looking into it shortly.
A. On Feb 8, 2017 08:19, "Staffan Forsell" <sta...@gmail.com> wrote: > Using the following declarative pipeline: > > pipeline { > agent any > environment { > WSROOT = "${env.WORKSPACE}" > } > stages { > > stage("Echo world") { > steps { > echo "Hello world! WSROOT: $WSROOT WSROOTenv: ${env.WSROOTenv} > WORKSPACE: ${env.WORKSPACE} " > } > } > } > } > > The output is "Hello world! WSROOT: null WSROOTenv: null WORKSPACE: > /home/user/jenkins/workspace/test_jobs/env-declarative-test" > > Is it possible to set a environment variable based on a previously defined > environment variable? In our case WSROOT needs to be defined to a subdir of > workspace and exist in the environment for many later stages. > > /Thanks > Staffan > > -- > 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 jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/ac3db3d5-75f6-4ba1-b7fa-91e604363998%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/ac3db3d5-75f6-4ba1-b7fa-91e604363998%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPbPdOZB4JEWnqC7Qd_4EKduTrtPEns2g43ecgHtxt6KH_ofDg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.