-
Bug
-
Resolution: Unresolved
-
Major
-
None
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
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 [ |
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 |
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 |
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 |
Component/s | Original: token-macro-plugin [ 15832 ] |
Assignee | Original: Dominik Bartholdi [ domi ] |