复杂而冗长的单一工作 Jenkins 工作流水线构建:还有吗? [英] Complex and long single-job Jenkins Job Pipeline Builds: There yet?

查看:35
本文介绍了复杂而冗长的单一工作 Jenkins 工作流水线构建:还有吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑到可恢复的 checkpoints 不可用?

Does it make sense to have one single Jenking Job Pipeline job for a full long-running deployment / "build" chain in the free Jenkins, given that resumable checkpoints are not available?

我正在查看 Jenkins' 开放/免费 管道包.

I'm looking at the current incarnation of Jenkins' the open/free Pipeline Bundle.

我会注意到,我认为您在此处免费获得的东西简直太棒了,因为大多数东西(工作流作业本身,stage-view, ...) 只是 CloudBees 一年商业企业捆绑包的一部分或者两个回来.

I'll note that I think that what you get for free here is quite simply amazing, seeing as most of the stuff (workflow-jobs themselves, stage-view, ...) was only part of the commercial enterprise bundle of CloudBees a year or two back.

在我看来,鉴于 stashing 功能和多节点功能,它是 - 并且确实如此宣传 - 可以创建一个 full 并完成 Build/Test/Bundle/在一个 Jenkins 作业中部署链.

It also seems to me that given the stashing abilities and multi-node capabilities of the Jenkins Pipleine, it is -- and indeed is advertised as such -- possible to create a full and complete Build/Test/Bundle/Deploy chain in one single Jenkins job.

这与 "historical"(?) Build Pipeline 形成对比插件,可让您在多个 Jenkins 作业之间拆分阶段".编排这些作业总是有点麻烦,更不用说在作业之间传递工件以及控制它们在不同节点上的运行方式了.

This is in contrast to the "historical"(?) Build Pipeline Plugin that let you split "stages" across multiple Jenkins Jobs. Orchestrating these jobs has always been abit of a hassle, not to mention passing artifacts between the jobs and controlling how they run on different nodes.

除了你从旧的构建管道插件中得到的是能够重新启动一个阶段"(当它失败时)——这是有效的,因为一个阶段"只是一个 Jenkins 工作运行你可以重复的(它也会运行所有下游的东西).

Except that what you do get from the Old Build Pipeline Plugin is being able to restart a "stage" (when it fails) -- this works because a "stage" is simply a Jenkins Job Run that you can repeat (and it will also run all the downstream stuff).

我们项目的 C++ 构建具有数小时的编译持续时间、运行更长时间的自动化测试以及最终的打包和设置创建,这也不是在几分钟内完成的.

Our project's C++ Builds have compilation durations of hours, Automated Tests that run longer hours and finally packaging and setup creation that also isn't done in a few minutes.

如果我执行管道构建",如果最后的设置创建由于设置创建相关问题而失败,我确实想要重建项目并重新运行单元测试.我想修复设置脚本并重做设置创建,这将(希望)成功结束这次运行.... 或者,如果某些自动化测试失败,例如,可疑的构建环境原因,我想修复构建环境并重新运行我的管道失败的测试向前,而不做多小时重新编译.

If I do a "pipleine-build", if the setup creation at the end fails due to setup-creation related problems, I do not want to rebuild the project and re-run the unit tests. I want to fix the setup scripts and redo the setup creation, that would (hopefully) wrap up this run with success. ... Or, if some automated tests fail for, e.g., suspected build environment reasons, I want to fix the build environment and re-run my pipeline from the failed test forward, without doing a multi-hour recompilation first.

碰巧新的 Jenkins Job Pipeline 包确实能够从 checkpoint.例外:它是 Enterprise Bundle 的一部分,这意味着它不是免费的.(我会注意到,我可以很好向 CloudBees 捐款,但我可以移动一个 use-as-many-nodes-as-you-like-and-also-be-able-to-just-do-testruns-whereever-you-like open software to a受限许可软件我必须跟踪节点数量,确保测试环境甚至可以设置许可等)

It so happens that the New Jenkins Job Pipeline bundle does have the ability to start from a checkpoint. Except: It's part of the Enterprise Bundle which means it's not free. (I'll note that I'd be fine with giving money to CloudBees, but I'm not fine with moving a use-as-many-nodes-as-you-like-and-also-be-able-to-just-do-testruns-wherever-you-like open software to a restricted licensed software where I have to keep track of number of nodes, make sure test environments can even be setup license-wise, etc.)

所以,鉴于对我而言,新 Jenkins 工作流水线能够从失败的步骤中恢复,似乎我又回到了原点无论如何,我必须将我运行时间较长的东西分成多个工作.

So, given that for me the New Jenkins Job Pipeline doesn't have the ability to resume from a failed step, it seems I'm back to square one and I have to split my longer-running stuff into multiple jobs anyway.

这就引出了一个问题,Jenkins Job Pipleine 是否真的是这项工作的最佳工具——如果我必须协调多个工作并且我想在创建方面简化和自动化它,我也可以使用Job DSL Plugin 从一个点维护所有这些工作 -- 然后问题是自由风格"的工作是否也不能很好地完成工作.

This then begs the question whether the Jenkins Job Pipleine is really the best tool for the job -- if I have to orchestrate multiple jobs and I want to streamline and automate this on the creation side, I could just as well use the Job DSL Plugin to maintain all these jobs from a single point -- and then the question is whether "free style" jobs wouldn't do the job just as well.

另一方面,我可能在这里遗漏了一些东西,还有另一种很好的单一工作方法吗?

On the other hand I might be missing something here and there is another good single Job approach for this?

我会注意到 Pipeline 运行的 Replay 选项看起来很有希望,如果有点粗略...

I'll note the Replay option for a Pipeline run looks promising, if a bit crude ...

推荐答案

CloudBees 最近决定开源 checkpoint 插件,你可以在 与 Jenkins Jira 相关的问题评论中列出的.

CloudBees has recently decided to open source the checkpoint plugin, as you can see in the linked issue on the Jenkins Jira that is listed in the comments.

不过,我还没有看到该插件的公开发布版本.

I haven't seen a publicly released version of the plugin yet, though.

这篇关于复杂而冗长的单一工作 Jenkins 工作流水线构建:还有吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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