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

EnvInject Plugin adds '=' sign at the end if 'Properties Content' is referencing a Build Parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • envinject-plugin
    • Jenkins 2.60.1
      OS - CentOS release 5.10
      EnvInject Plugin 2.1.3

      When using a +build paramete+r in the Properties Content field of the Inject environmental variables build step the plugin adds a '=' sign at the end.

      Example:

      1. Define a Text Parameter called: ENV_VARS_TEST
      2. Add a build step "Inject environmental variables"
      3. Set Properties Content to ${ENV_VARS_TEST}
      4. Start a Build and set the ENV_VARS_TEST Build Parameter to $FOO_VAR=BAR

      The Build Output:
      [EnvInject] - Loading node environment variables.
      [EnvInject] - Injecting environment variables from a build step.
      {{[EnvInject] - Injecting as environment variables the properties content }}
      $FOO_VAR=BAR=

      See the "=" added at the end of the line.

      Same happens if I define "FOO_VAR=BAR" (without the $ sign) in the build parameter. Then I get

      [EnvInject] - Injecting as environment variables the properties content
      FOO_VAR=BAR=

      When I add the string "$FOO_VAR=BAR" directly into the "Inject environmental variables" build step "Properties Content" section I get the expected "$FOO_VAR=BAR", like so:
      [EnvInject] - Injecting environment variables from a build step.
      [EnvInject] - Injecting as environment variables the properties content
      $FOO_VAR=BAR

      As soon as I put a build parameter into the Properties Content section I get this behavior with the added "=" at the end.

      I was also able to reproduce this in a fresh free-style created project with just this and a shell-echo buildstep

      .

            Unassigned Unassigned
            sthum Steffen Thumser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: