管道进行矩阵配置

管道进行矩阵配置

本文介绍了使用 Jenkins 管道进行矩阵配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jenkins Pipeline 插件(又名 Workflow)可以使用其他 Multibranch 插件进行扩展,以自动构建分支和拉取请求.

运行多个配置的首选方式是什么?例如,使用 Java 7 和 Java 8 构建.这通常称为矩阵配置(因为语言版本、框架版本等多种组合)或构建变体.

我试过了:

  • 将它们作为单独的 stage 步骤连续执行.不错,但需要的时间比必要的多.
  • parallel 步骤中执行它们,无论是否在其中分配 node.可以,但我不能在并行中使用 stage 步骤来限制它的可视化方式.

有推荐的方法吗?

解决方案

似乎至少有了

The Jenkins Pipeline plugin (aka Workflow) can be extended with other Multibranch plugins to build branches and pull requests automatically.

What would be the preferred way to run multiple configurations? For example, building with Java 7 and Java 8. This is often called matrix configuration (because of the multiple combinations such as language version, framework version, ...) or build variants.

I tried:

  • executing them serially as separate stage steps. Good, but takes more time than necessary.
  • executing them inside a parallel step, with or without nodes allocated inside them. Works but I cannot use the stage step inside parallel for known limitations on how it would be visualized.

Is there a recommended way to do this?

解决方案

It seems like there is relief coming at least with the BlueOcean UI. Here is what I got (the tk-* nodes are the parallel steps):

这篇关于使用 Jenkins 管道进行矩阵配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 14:57