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

Property variable not set if using a property file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: envinject-plugin
    • Labels:
      None
    • Environment:
      Linux (RedHat), Jenkinx 1.446, EnvInject 1.17
    • Similar Issues:

      Description

      I am trying to inject environment variables to the build process after SCM checkout. If I point to a .properties file in the workspace some variables do not get set properly while others are OK. If I copy/paste the content of the file into the "Properties Content" box in the Jenkins project configuration page then it works fine for all variables.

      For example

      AVARIABLE=/some/path
      PATH=/opt/bin:$

      {AVARIABLE}/bin:${PATH}
      LD_LIBRARY_PATH=${AVARIABLE}

      /lib:$

      {LD_LIBRARY_PATH}

      where I already have some existing directories in my $PATH. If I save this in a file and point to it then I get errors :

      [EnvInject] - Variables injected successfully.
      [EnvInject] - Unset unresolved 'PATH' variable.
      [EnvInject] - Unset unresolved 'LD_LIBRARY_PATH' variable.

      But the same 3 lines work fine if I enter them directly in the "Properties Content" dialog box

        Attachments

          Activity

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              atriku Bruno L
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: