Proper practice to migrate multi-configuration (matrix) job to pipeline job?

188 views
Skip to first unread message

Rick Liu

unread,
Jun 30, 2016, 3:02:18 AM6/30/16
to Jenkins Users
I'm planing to migrate Jenkins1 multi-configuration (matrix) job to Jenkins2 pipeline (-as-Code) approaches,
but it seems the pipeline job and multi-branch pipeline job don't support multi-configuration (matrix) job directly.

What's the best practice to achieve this?

Assume my project has 100+ different models with some variants (debug, release, etc) to build,
and the only major difference among the build steps is
the first "Configure" step:
eg.
Configure --model $MODEL_NAME --variant $VARIANT

In Jenkins1,
I'm using multi-configuration (matrix) with 2 axis - MODEL_NAME and VARIANT to define the build.

Mark Waite

unread,
Jun 30, 2016, 8:49:43 AM6/30/16
to Jenkins Users
https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md includes a section on "Creating Multiple Threads".  It seems like that might be one way to accomplish the permutation of models and variants that you need.  I think you would define the values of the models and variants, then loop over those values.

Mark Waite

Rick Liu

unread,
Jun 30, 2016, 11:04:56 PM6/30/16
to Jenkins Users
Thank you Mark~
This is exactly what I'm looking for.

Rick
Reply all
Reply to author
Forward
0 new messages