Markus Meisterernst edited a comment on Bug JENKINS-14193

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 ot 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.

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

Reply via email to