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

Matrix variables are not accessible to shell scripts

      When I create a multiple configuration project with user-defined axes, the variables are not accessible to the rest of the project. For example, if I create the variable buildConfig, and give it two values, Release and Debug, I can show it using a batch command:

      echo buildConfig = %buildConfig%

      This correctly displays "buildConfig = Release" or "buildConfig = Debug".

      But if I add a shell command:

      echo buildConfig = $buildConfig

      This shows only "buildConfig = "

      Neither %buildConfig%, $buildConfig, nor ${buildConfig} results in the correct replacement.

      I have only tested this on Windows

          [JENKINS-29397] Matrix variables are not accessible to shell scripts

          Roderick Kennedy created issue -
          Martin Weber made changes -
          Component/s New: matrix-project-plugin [ 18765 ]
          Component/s Original: cmakebuilder-plugin [ 15966 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 164272 ] New: JNJira + In-Review [ 181574 ]
          Jesse Glick made changes -
          Labels Original: envinronment-variables matrix New: envinronment-variables environment-variables matrix
          Jesse Glick made changes -
          Labels Original: envinronment-variables environment-variables matrix New: environment-variables matrix

            Unassigned Unassigned
            rvkennedy Roderick Kennedy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: