|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
[JIRA] (JENKINS-14193) EnvInject doesn't pass variables defined in prebuild step if maven project is used
markus.meisterer...@gmail.com (JIRA) Thu, 17 Jan 2013 12:27:01 -0800
- [JIRA] (JENKINS-14193) EnvInject does... gagoja...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... gregory.boissi...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... gregory.boissi...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... gregory.boissi...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... gagoja...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
- [JIRA] (JENKINS-14193) EnvInject... markus.meisterer...@gmail.com (JIRA)
Hi again,
as Jaime pointed out, the problem stems from the fact that a variable is to be resolved dynamically from outside to the environment.
In my case I wanted to set a variable from a call to git ("git describe" to get hold of the revision count from the latest label/tag).
I therefore executed a Shell script, redirected the output to a file and read in the Property file to inject the property to the Environment.
My intend was to pass it to a "parameterized" maven build like the following: clean install deploy -Drevision=${Revison}.
>From the build console output I can see that it doesn't resolve the variable ${Revision}. The Environment, however, has this Parameter perfectly resolved and set.
So, the workaround you suggested won't work in my case.
Currently we stick to the BUILD_NUMBER which is resolved magically enough (mvn clean install deploy -Drevision=${BUILD_NUMBER}).
Ok, it's a workaround, a nasty one as it is linear increasing with no real connection to git and versioning/branching stuff.
As I'm quite new to the Jenkins eco-system I ask myself, if it is best to write a plugin for my case ...
Or else (what would make much more sense) if you could give me guidance on where about to apply a fix so I could offer you some time to analyse and help out to improve the EnvInject plugin.