Jenkins Multi-Configuration Project在不同节点上并发执行 [英] Jenkins Multi-Configuration Project execute concurrently on different nodes

查看:266
本文介绍了Jenkins Multi-Configuration Project在不同节点上并发执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Jenkins 2.5中配置了一个多配置作业,该作业在我们产品的不同配置版本和不同OS映像上执行测试套件.

已将该作业配置为在不同的OS节点(Windows 7,Windows 8.1,Windows 10,POS Ready 7等)上运行.然后,在每个这些OS上,我们使用不同的配置运行测试,这些配置必须一次运行1.

当前,多配置项目将在各种计算机上依次运行每个测试方案.作业配置为启用了Execute concurrent builds if necessary标志,但是这些作业不能并行运行.

针对不同的操作系统映像,使用节点设置节点配置http://i.stack.imgu 然后针对不同的配置进行设置,即使作业按顺序运行,也会在同一OS上运行多次执行.

我希望在每个节点上同时运行一个配置,以便每个OS映像都在运行一个配置.使用4个操作系统和3个配置,有12个作业要运行.每次工作1个小时,即12个小时,如果作业并行运行(每个OS上运行一次),则将运行3种不同的配置,并且应总共花费约3个小时完成.

理想情况下,执行将是: (Windows 7/Config1)& (Windows 8.1/Config1)& (Windows 10/Config1)全部同时运行,然后每个操作系统都带有Config2,然后每个操作系统都带有Config3.正如我指出的那样,即使每个OS都同时运行测试,即使在任何OS上将配置混合在一起(config1或config2或config3),并且每个OS一次只能运行1个配置测试. /p>

r.com/Qt83L.png

解决方案

我建议您使用节点标签参数插件.

配置非常简单-

  1. 添加新的自由样式作业-添加节点参数和其他必需参数.该作业将运行您的逻辑(现在正在运行多配置作业)

  1. 添加新的多工作业(确保您选择的类型是多工!)
    • 在构建部分添加一个多工阶段
    • 向您在上面创建的作业中添加3个触发器,为每个触发器发送您在多配置作业中使用的每个节点名称,以及 您要运行的配置.例如,您将触发 具有预定义参数的作业以指定节点和测试 您要运行的配置.
    • 重复为每个测试配置添加多作业阶段.

示例:

此配置将在每个测试配置下每次运行3次执行,因为一个阶段中的任何内容都在并行运行.

祝你好运!

I have configured a multi-configuration job in the Jenkins 2.5 that executes a test suite across different configured versions of our product, and on different OS images.

The job is configured to run with different OS nodes (Windows 7, Windows 8.1, Windows 10, POS Ready 7, etc...). On each of these OS's we then run the tests with different configurations which have to run 1 at a time.

Currently, the multi-configuration project will run each of the test scenarios sequentially across the various computers. The job is configured with the Execute concurrent builds if necessary flag enabled, but the jobs do not run in parallel.

Using the node setting Node Configuration http://i.stack.imgu for the different OS images and then a setting for the different configs, multiple executions on the same OS will run, albeit the jobs run sequentially.

I was hoping that one configuration would be run on each node concurrently so that each OS image is running one configuration. With 4 OS's and 3 configurations, there are 12 jobs to be run. At 1 hour each, this is 12 hours, where if the jobs ran in parallel (one on each OS) then the 3 different configurations would run, and should be done in about 3 hours total.

Ideally, the execution would be: (Windows 7 / Config1) & (Windows 8.1 / Config1) & (Windows 10 / Config1) all running at the same time, then each OS with Config2, and then each OS with Config3. As I indicated, even if the configs were intermixed (config1 or config2 or config3) on any of the OS's as long as each OS is running a test at the same time, and will only run 1 configuration test per OS at a time.

r.com/Qt83L.png

解决方案

I would suggest you'd work with the Multijob Plugin combined with the Node Label Parameter plugin.

It's quite simple to configure it -

  1. Add new free style job - add node parameter and other required parameters. This job will be running your logic (what the multi-configuration job is running now)

  1. Add new multi-job job (make sure the type you select is a multi job!)
    • In the build section add a multi-job phase
    • Add 3 triggers to the job you created above, send each node name you're using in your multi-configuration job for each trigger, and the configuration you want to run. for example, you will trigger the job with predefined parameters to specify the node and the test configuration you want to run.
    • Repeat adding multi-job phases for each test configuration.

Example:

This configuration will run 3 execution each time with each test configuration, as anything under a phase is running in parallel.

Good luck!

这篇关于Jenkins Multi-Configuration Project在不同节点上并发执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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