复杂而漫长的单人工作詹金斯工作流水线版本:有吗? [英] Complex and long single-job Jenkins Job Pipeline Builds: There yet?

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

问题描述

在免费的Jenkins中拥有一个单个 Jenking Job Pipeline作业来进行完整的长期运行的部署/构建"链有意义吗,因为无法使用可恢复的checkpoint?

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.

我会注意到,我认为您免费获得的 简直太神奇了,同时看到了大部分内容(工作流程本身,

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.

在我看来,考虑到 stash ing Jenkins Pipleine的功能和多节点功能,并且确实是这样宣传的-可以创建 full 并在一个单人詹金斯的工作.

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"(?)构建管道形成对比插件,可让您跨多个Jenkins Jobs分割阶段".编排这些作业一直很麻烦,更不用说在作业之间传递工件并控制它们在不同节点上的运行方式了.

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.

除了您从旧版本构建管道插件中获得的内容是能够重新启动阶段"(失败时)之外,这是可行的,因为阶段"仅仅是詹金斯的工作运行您可以重复的操作(它还将运行所有下游的东西).

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 ++ Build的编译时间为几个小时,自动测试的运行时间更长,最后打包和设置的创建也要在几分钟之内完成.

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.

如果我执行"Pipleine-build",如果最后的安装创建由于与安装创建相关的问题而失败,我不是要重建项目并重新运行单元测试.我想修复安装脚本并重做安装程序创建,这将(希望)成功完成此运行. ...或者,如果某些自动化测试由于怀疑的构建环境原因而失败,那么我想修复构建环境并从失败的测试中重新运行管道 ,而无需执行多次小时重新编译.

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.

碰巧的是,New Jenkins Job Pipeline捆绑包确实能够从不是)根据您的喜好,也可以在任何您喜欢的开放软件上进行测试,以使用受限的许可软件,在该软件中我必须跟踪节点数,并确保测试环境甚至可以按许可证设置,等等.)

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.)

因此,鉴于对我而言,新詹金斯工作流水线没有能够从失败的步骤中恢复,所以似乎我回到正题而且我还是不得不将我运行时间更长的东西拆分为多个工作.

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插件可以单点维护所有这些工作- -然后问题是,自由式"工作是否会做得同样好.

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.

另一方面,我可能在这里丢失了一些东西,对此还有另一种很好的单一Job方法吗?

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

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

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

推荐答案

CloudBees最近决定开放检查点插件的源代码,如您在

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.

这篇关于复杂而漫长的单人工作詹金斯工作流水线版本:有吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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