-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
It would be great to be able to declare a Matrix Combination Parameter in declarative pipeline. Code like this (found at https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.BuildParametersContext.matrixCombinationsParam) does not work:
pipeline { parameters { matrixCombinationsParam 'TARGET_ARCHS', description: 'Target platforms to build engine for' } }
Or maybe it is currently somehow achievable via '$class' and 'MatrixCombinationsParameterDefinition' (if yes, then this should be documented)?
properties([ [$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'MatrixCombinationsParameterDefinition', name: 'TARGET_ARCHS', description: 'Target platforms to build engine for' ] ] ] ]) pipeline { ... }
The code above leads to:
TARGET_ARCHSNot applicable. Applicable only to multi-configuration projects.
Also don't know how to use the approach with 'properties' above to extend the set of parameters with a new MatrixCombinationsParameterDefinition one instead of overwriting the entire parameter list.
[JENKINS-61504] Declaring a Matrix Combination Parameter in declarative pipeline
Description |
Original:
It would be great to be able to declare a Matrix Combination Parameter in declarative pipeline. Code like this (found at https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.BuildParametersContext.matrixCombinationsParam) does not work: {code:java} pipeline { parameters { matrixCombinationsParam 'TARGET_ARCHS', description: 'Target platforms to build engine for' } }{code} Or maybe it is currently somehow achievable via '$class' and 'MatrixCombinationsParameterDefinition' (if yes, then this should be documented)? |
New:
It would be great to be able to declare a Matrix Combination Parameter in declarative pipeline. Code like this (found at [https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.BuildParametersContext.matrixCombinationsParam]) does not work: {code:java} pipeline { parameters { matrixCombinationsParam 'TARGET_ARCHS', description: 'Target platforms to build engine for' } }{code} Or maybe it is currently somehow achievable via '$class' and 'MatrixCombinationsParameterDefinition' (if yes, then this should be documented)? {code:java} properties([ [$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'MatrixCombinationsParameterDefinition', name: 'TARGET_ARCHS', description: 'Target platforms to build engine for' ] ] ] ]) pipeline { ... }{code} |
Description |
Original:
It would be great to be able to declare a Matrix Combination Parameter in declarative pipeline. Code like this (found at [https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.BuildParametersContext.matrixCombinationsParam]) does not work: {code:java} pipeline { parameters { matrixCombinationsParam 'TARGET_ARCHS', description: 'Target platforms to build engine for' } }{code} Or maybe it is currently somehow achievable via '$class' and 'MatrixCombinationsParameterDefinition' (if yes, then this should be documented)? {code:java} properties([ [$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'MatrixCombinationsParameterDefinition', name: 'TARGET_ARCHS', description: 'Target platforms to build engine for' ] ] ] ]) pipeline { ... }{code} |
New:
It would be great to be able to declare a Matrix Combination Parameter in declarative pipeline. Code like this (found at [https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.BuildParametersContext.matrixCombinationsParam]) does not work: {code:java} pipeline { parameters { matrixCombinationsParam 'TARGET_ARCHS', description: 'Target platforms to build engine for' } }{code} Or maybe it is currently somehow achievable via '$class' and 'MatrixCombinationsParameterDefinition' (if yes, then this should be documented)? {code:java} properties([ [$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'MatrixCombinationsParameterDefinition', name: 'TARGET_ARCHS', description: 'Target platforms to build engine for' ] ] ] ]) pipeline { ... }{code} The code above leads to: {noformat} TARGET_ARCHSNot applicable. Applicable only to multi-configuration projects.{noformat} Also don't know how to use the approach with 'properties' above to extend the set of parameters with a new MatrixCombinationsParameterDefinition one instead of overwriting the entire parameter list. |
Issue Type | Original: Bug [ 1 ] | New: Improvement [ 4 ] |