[JIRA] (JENKINS-61504) Declaring a Matrix Combination Parameter in declarative pipeline

8 views
Skip to first unread message

wszebor@parasoft.com (JIRA)

unread,
Mar 18, 2020, 5:50:02 AM3/18/20
to jenkinsc...@googlegroups.com
Wszebor W. created an issue
 
Jenkins / Bug JENKINS-61504
Declaring a Matrix Combination Parameter in declarative pipeline
Issue Type: Bug Bug
Assignee: Unassigned
Components: matrix-combinations-parameter-plugin
Created: 2020-03-18 09:49
Priority: Minor Minor
Reporter: Wszebor W.

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)?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

wszebor@parasoft.com (JIRA)

unread,
Mar 18, 2020, 6:31:03 AM3/18/20
to jenkinsc...@googlegroups.com
Wszebor W. updated an issue
Change By: Wszebor W.
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}
 

 

wszebor@parasoft.com (JIRA)

unread,
Mar 18, 2020, 6:33:03 AM3/18/20
to jenkinsc...@googlegroups.com
Wszebor W. updated an issue
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.
Reply all
Reply to author
Forward
0 new messages