Hello Domi, Thank you very much for the reply.
I tried EnvInject+Plugin. The variable now gets injected but there seems to be a problem with Jenkins Core not reading injected variables: https://issues.jenkins-ci.org/browse/JENKINS-14193?page=com.atlassian.streams.streams-jira-plugin:activity-stream-issue-tab So it seems that I have to wait for this fix now. On Sat, Aug 11, 2012 at 7:20 AM, domi <[email protected]> wrote: > The envinject plugin[1] allows you to use a script to setup your env. > and there is also the the environment script plugin [2] which allows you > to do the same (why there are two plugins for the same? I have no idea...) > /Domi > > > https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin > https://wiki.jenkins-ci.org/display/JENKINS/Environment+Script+Plugin > > On 09.08.2012, at 20:25, SamL <[email protected]> wrote: > > > Hello Folks. > > > > > > I am setting some Maven jobs in Jenkins that need to have a value > changed each time it runs. > > > > So it would look like the following: > > > > So one of the setting for Goal and options looks like the following: > > > > -Dorg.jenkins.job.mercurial.revision=$REV_NUM > > > > > > The REV_NUM has to be calculated by the job at build time > > > > Is there a way for me to set the REV_NUM value each time a build runs? > > > > > > Running Jenkins: 1.476 > > On Linux Ubuntu > > Exporting it as env variable does not work. > > > > Thank you in advance for the help. > >
