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

EnvInject failure using multi-configuration jobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: envinject-plugin
    • Labels:
      None
    • Environment:
      Debian 5.0
    • Similar Issues:

      Description

      We recently upgraded to 1.424.1 LTS, and switched to the EnvInject plugin instead of the deprecated "Hudson SetEnv" plugin to set environment variables for our jobs.

      All our multi-configuration jobs are now failing:

      [EnvInject] - [ERROR] - [EnvInject] - [ERROR] - Problems occurs on injecting env vars as a build step: hudson.matrix.MatrixConfiguration cannot be cast to hudson.model.TopLevelItem

      This is easy to reproduce:

      • Install EnvInject
      • Create a new multiconfiguration job
      • Add an axis named "axis" with the values "a b c"
      • Add an execute shell build step consisting of "echo $axis"
      • Save and run the job (it should execute successfully against three configurations)
      • Now, edit the job and check "Inject environment variables to the build process" in the Build Environment section. You don't actually need to add any properties content to reproduce the problem--just check the checkbox.
      • Run the job again. All three configurations fail.

      This is a big problem for us as all our multi-configuration jobs also use environment variables.

        Attachments

          Activity

          twood Thomas Wood created issue -
          gbois Gregory Boissinot made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          javierb JavierB made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          gbois Gregory Boissinot made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          mikerohan Mikel Perez made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          gbois Gregory Boissinot made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 142429 ] JNJira + In-Review [ 190106 ]

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              twood Thomas Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: