Jenkins和多配置(矩阵)作业 [英] Jenkins and multi-configuration (matrix) jobs

查看:536
本文介绍了Jenkins和多配置(矩阵)作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Jenkins有两种作业?多重配置项目和自由式项目项目?我读某处,一旦你选择其中一个,你不能转换到另一个(容易)。为什么我总是选择多重配置项目,以便为未来的变化做好安全?

Why are there two kinds of jobs for Jenkins, both the multi-configuration project and the free-style project project? I read somewhere that once you choose one of them, you can't convert to the other (easily). Why wouldn't I always pick the multi-configuration project in order to be safe for future changes?

我想为一个项目建立一个构建,和Unix(以及其他平台)。我发现此问题),它询问相同东西,但我真的得不到答案。为什么我需要三个矩阵项目(而不是三个自由式项目),每个平台一个?为什么我不能将它们全部保存在一个矩阵中,在一个轴上有平台AND(例如)gcc版本,另一个轴上有(我的)软件版本?

I would like to setup a build for a project building both on Windows and Unix (and other platforms as well). I found this question), which asks the same thing, but I don't really get the answer. Why would I need three matrix projects (and not three free-style projects), one for each platform? Why can't I keep them all in one matrix, with platforms AND (for example) gcc version on one axis and (my) software versions on the other?

也请阅读此博客帖子,但它会在同一台机器上构建一切,只是不同的Python版本。

I also read this blog post, but that builds everything on the same machine, with just different Python versions.

简而言之,大多数人如何配置一个针对多个不同平台的多配置项目?

So, in short: how do most people configure a multi-configuration project targeting many different platforms?

推荐答案

这两种类型的作业有不同的功能:

The two types of jobs have separate functions:


    <这些允许您在单个计算机或标签(计算机组,例如Windows-XP-32)上构建项目。
  • 多重配置工作:这些工作允许您在多台电脑或标签上建立专案,或是两者的组合,例如Windows XP,Windows Vista,Windows 7 RedHat - 可用于检查兼容性或构建多个平台(qt程序)

  • Free-style jobs: these allow you to build your project on a single computer or label (group of computers, for eg "Windows-XP-32").
  • Multi-configuration jobs: these allow you to build your project on multiple computers or labels, or a mix of the two, for eg Windows-XP, Windows-Vista, Windows-7 and RedHat - useful for checking compatibility or building for multiple platforms (qt programs?)

项目,你想构建在Windows& Unix,您有两个选项:

If you have a project which you want to build on Windows & Unix, you have two options:


  • 为每个配置创建一个单独的自由式作业,在这种情况下,

  • 您有一个多配置作业,并且选择2个(或更多个)标签/计算机/从属设备 - 1个用于Windows,1个用于Unix。在这种情况下,您只需为构建维护一个作业

  • Create a separate free-style job for each configuration, in which case you have to maintain each one individually
  • You have one multi-configuration job, and you select 2 (or more) labels/computers/slaves - 1 for Windows and 1 for Unix. In this case, you only have to maintain one job for the build

您可以将gcc版本保留在一个轴上,版本。没有理由你不应该能够。

You can keep the your gcc versions on one axis, and software versions on another. There is no reason you should not be able to.

您链接的问题有一个公平的问题,但是与您的问题无直接关系的问题:在他的情况下,他有一个多配置作业 (成功时)触发了另一个工作 B 。现在,在多配置作业中,如果其中一个配置失败,整个作业将失败(显然,因为您希望项目在所有配置上成功创建)。

The question that you link has a fair point, but one that does not relate to your question directly: in his case, he had a multi-configuration job A, which - on success - triggered another job B. Now, in a multi-configuration job, if one of the configuration fails, the entire job fails (obviously, since you want your project to build successfully on all your configurations).

IMHO,为了在多个平台上构建同一个项目,更好的方法是使用多配置风格的作业。

IMHO, for building the same project on multiple platforms, the better way to go is to use a multi-configuration style job.

这篇关于Jenkins和多配置(矩阵)作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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