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

Error when using axis as token




      In Jenkins version 1.651.1 it is possible in a [matrix job|https://wiki.jenkins.io/display/JENKINS/Matrix+Project+Plugin] to use a [conditional-buildstep|https://wiki.jenkins.io/display/JENKINS/Conditional+BuildStep+Plugin] to run a build step to trigger/call builds on other projects and to have as part of the condition the name of an axis (using [token expansion|https://wiki.jenkins.io/display/JENKINS/Token+Macro+Plugin]).  Doing this in our setup causes the following exception:

       Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'PLATFORM' in '$\{PLATFORM}'], action = [Fail the build]

      For example, having an axis named PLATFORM with string values NX3 and LX3 use to be able to be used in a conditional build step comparing two strings where string 1 is ${PLATFORM} and string 2 is hard coded to NX3 or LX3 which would build jobs in the matrices differently:

      In addition, adding the same functionality using a dynamic axis would be even better.

      Our setup:

      • Jenkins version 2.107.1
      • Matrix plugin version 1.11 or 1.12
      • Token macro plugin v2.3
      • Conditional BuildStep 1.3.6
      • Dynamic axis v1.0.3

      Other setup:

      • Jenkins version 1.651.1
      • Will get info on the other versions if it matters when I can

      It's a nice feature to have the axis as a token to build the same job differently.  Perhpas similar to the email-ext problem JENKINS-14382?




            Unassigned Unassigned
            architeuthis Jarrett B
            1 Vote for this issue
            3 Start watching this issue