本文介绍了如何配置詹金斯多配置构建和测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在多种配置上进行构建和测试:linux,osx和solaris.我有标记为"linux","osx"和"solaris"的从属节点.在每个配置,我要(a)建立(b)运行冒烟测试(c)如果通过了烟雾测试,则运行完整测试,甚至可能还要进行更多测试.

I need to build and test on multiple configurations: linux, osx andsolaris. I have slave nodes labeled "linux", "osx" and "solaris". Oneach configuration, I want to (a) build (b) run smoke tests(c) if smoke tests pass, then run full tests, and perhaps more.

我认为多配置作业可能是答案,所以我设置了一个多配置构建作业,并在每个构建作业上启动并发构建操作系统.该构建作业将触发下游的烟雾测试构建,轮流触发完整测试作业.

I thought that multi-configuration jobs might be the answer, so I setup amulti-configuration build job and it starts concurrent builds on eachOS. The build job will trigger a downstream smoke-test build, which, inturn, triggers the full-test job.

我遇到了以下问题

  1. 如果其中一种配置失败,则整个作业将失败,并且詹金斯(Jenkins)不会解雇任何下游工作(例如,如果solaris失败,Jenkins将不会对osx和osx运行冒烟测试或完整测试linux).

  1. If one of the configurations fails, the job as a whole fails, andJenkins will not fire any downstream jobs (e.g., if the solaris buildfails, Jenkins will not run smoke tests or full tests for osx andlinux).

solaris版本的构建时间大约是其他版本的两倍(在一个小时的订单),我更喜欢linux和osx烟雾测试,而不是等待solaris的构建完成.

The solaris build takes about twice as long as the others (on theorder of an hour), and I'd prefer the linux and osx smoke tests notwait for the solaris build to finish.

这是否意味着我剩下了手工制作的三个工作流程,并且将他们置于一切皆有可能"的工作(即创建和手工链接)以下工作)?

Does that mean I'm left with hand-crafting three pipelines of jobs, andputting them behind a "start-all" job (i.e., creating and hand-chainingthe following jobs)?

build-linux   smoke-test-linux   full-test-linux
build-osx     smoke-test-osx     full-test-osx
build-solaris smoke-test-solaris full-test-solaris

我想念一些明显的东西吗?

Did I miss something obvious?

推荐答案

据我所知,答案是创建3个矩阵作业,每个系统作业一个.然后,他们将有3个子工作(构建,烟度测试,完整测试),并将构建工作作为试金石.

As far as I know the answer is to create 3 matrix jobs, one for each system. They then would have 3 subjobs (build, smoke-test, fulltest) with the build-job as a touchstone.

这篇关于如何配置詹金斯多配置构建和测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 09:02