Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30069

versionnumber plugin should resolve vars from "envinject" plugin

      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

          Oleg Nenashev added a comment - - edited

          Did you try to use "EnvInject" job property? Such case should be working in 1.92

          Oleg Nenashev added a comment - - edited Did you try to use "EnvInject" job property? Such case should be working in 1.92

          Roger Spring added a comment -

          There are several properties the EnvInject plugin has available in the job configuration. However, even the very first configuration that can read a file from SCM, does so after the versionnumber-plugin evaluates the job environment variables. Are you asking about a particular job property?

          Roger Spring added a comment - There are several properties the EnvInject plugin has available in the job configuration. However, even the very first configuration that can read a file from SCM, does so after the versionnumber-plugin evaluates the job environment variables. Are you asking about a particular job property?

          Michael Fowler added a comment - - edited

          I would like to be able to use the following in the version field:

          ${PROPFILE,file="JenkinsPropFile.txt",property="Version"}
          

          Michael Fowler added a comment - - edited I would like to be able to use the following in the version field: ${PROPFILE,file="JenkinsPropFile.txt",property="Version"}

          Oleg Nenashev added a comment -

          No plan to work on it anytime soon. Pull requests will be appreciated, reviewed and integrated if possible.

          Oleg Nenashev added a comment - No plan to work on it anytime soon. Pull requests will be appreciated, reviewed and integrated if possible.

            Unassigned Unassigned
            rspring Roger Spring
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: