Jenkins/Hudson-如何并行运行多个作业,深度超过1级? [英] Jenkins/Hudson - How to run multiple jobs in parallel more than 1 level deep?

查看:130
本文介绍了Jenkins/Hudson-如何并行运行多个作业,深度超过1级?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让以下工作流程同时在Jenkins中运行.因此,例如,A和B同时运行. A一次完成后,同时运行A2和A3,依此类推...

I'm trying to get the following workflow running in Jenkins, in parallel. So for example, both A and B running at the same time. As soon as A finishes run A2 and A3 at the same time, etc...

这似乎是一个非常常见的用例,但是我尝试过的大多数插件都不支持超过1级的深度,下面的A分支就是这种情况.在这里加入插件似乎没有帮助.

It seems like a pretty common use case but most plugins I tried do no support more than 1 level deep, which is the case with the A branch below. Join plug-in doesn't seem helpful here.

阅读有关使用Promotional插件的信息,但我对指纹/人工制品要归档的内容有些迷惑.

I read about using the Promotion plugin but I'm a little mystified on what to fingerprint/artifacts to archive to make this work.

关于如何使这个简单的构建管道起作用的任何线索?

Any clue on how to make this simple build pipeline work?

推荐答案

正如 jgritty 指出,您可以使用构建流程插件.为了获得并行执行的类型,您可以运行与以下构建流程脚本等效的内容:

As jgritty pointed out you could use the Build flow plugin. In order to get the type of parallel execution you want you could run something equivalent to the following build flow script:

buildTrigger = build("Trigger")

parallel(
    {
        buildA = build("A")
        buildA1 = build("A1")
        parallel(
            {
                buildA2 = build("A2")
            },
            {
                buildA3 = build("A3")
            },
        )
    },
    {
        buildB = build("B")
        buildB1 = build("B1")
    },
)

buildResults = build("GatherResult")

在此脚本中,第一个parallel块负责A和B分支.在分支中,每个构建都是顺序的,直到您添加更多的parallel块.

In this script the first parallel block takes care of the A and B branches. Once in a branch each build is sequential until you add more parallel blocks.

这篇关于Jenkins/Hudson-如何并行运行多个作业,深度超过1级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆