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?

          [JENKINS-50377] Error when using axis as token

          Jarrett B created issue -
          Jarrett B made changes -
          Description Original: 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 'jobs_to_run' in '$jobs_to_run'], 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:

          !configuration_matrix_axis.PNG!

          !build_job_condition.PNG!

          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|https://issues.jenkins-ci.org/browse/JENKINS-14382]?
          New: 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:

          !configuration_matrix_axis.PNG!

          !build_job_condition.PNG!

          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?
          Jarrett B made changes -
          Description Original: 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:

          !configuration_matrix_axis.PNG!

          !build_job_condition.PNG!

          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?
          New: 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:
          {code}
           Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'PLATFORM' in '$\{PLATFORM}'], action = [Fail the build]
          {code}
           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:

          !configuration_matrix_axis.PNG!

          !build_job_condition.PNG!

          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?
          Alex Earl made changes -
          Component/s Original: token-macro-plugin [ 15832 ]
          Dominik Bartholdi made changes -
          Assignee Original: Dominik Bartholdi [ domi ]

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

              Created:
              Updated: