-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins version 1.609
versionnumber-plugin evaluates the environment variables before the envinject-plugin injects them, if the envinject-plugin is configured to inject them from a source file checked out from SCM.
The versionnumber-plugin has a "Version Number Format String" field which can take environment variables as the input. Trying to inject the variable, results in a blank evaluation of the variable, because it's instantiated from the SCM sourced file after the versionnumber-plugin.
It would be nice if to alter the order in which these plugins are run so they can work together.
[JENKINS-30069] versionnumber plugin should resolve vars from "envinject" plugin
Assignee | Original: Manuel Recena Soto [ recena ] | New: Oleg Nenashev [ oleg_nenashev ] |
Summary | Original: Plugin IDs "versionnumber" and "envinject" incompatible | New: versionnumber plugin should resolve vars from "envinject" plugin |
Comment |
[ Here's what worked for me: 1. Install the "Pre SCM BuildStep Plugin" 2. Enable to "Run buildstep before SCM runs" in job configuration 3. Add a build step "Inject environment variables" within the "Pre SCM BuildStep" 4. Now you can use the environment variable in the "Version Number Format String" ] |
Workflow | Original: JNJira [ 165152 ] | New: JNJira + In-Review [ 181856 ] |
Assignee | Original: Oleg Nenashev [ oleg_nenashev ] |
Did you try to use "EnvInject" job property? Such case should be working in 1.92