从Jenkins Multijob迁移到Pipeline插件 [英] Migrate from Jenkins Multijob to Pipeline plug-in

查看:357
本文介绍了从Jenkins Multijob迁移到Pipeline插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我们将Jenkins CI 1.643(我相信)与Multijob插件和Job DSL一起使用.
使用Job DSL生成作业集合,以及一个包含特定顺序(构建,分析,单元测试,集成测试等)的所有其他作业的多作业.

Currently we are using Jenkins CI 1.643 (I believe) with the Multijob plugin and Job DSL.
A collection of jobs is generated using Job DSL, as well as a multijob that contains all the other jobs in a specific order (build, analysis, unit test, integration test, etc.).

我对升级到Jenkins 2并使用Pipeline插件(以前称为Workflow插件)感兴趣. Pipeline插件提供了一个很好的图形表示形式,还提供了我们目前尚不具备的一些更高级的功能(例如"pause"操作,需要人工干预). 蓝海项目似乎也非常时尚,但需要使用Pipeline插件.

I'm interested in upgrading to Jenkins 2 and using the Pipeline plug-in (previously known as the Workflow plug-in). The Pipeline plug-in offers a nice graphical representation and also offers some more advanced features that we currently do not have (like the "pause" action, that requires human interaction). The Blue Ocean project also seems to be very sleek, but requires the Pipeline plug-in.

关于迁移,我有几个问题:

Regarding the migration, I have a few questions:

  • 我应该继续使用Job DSL吗?我们在Groovy中创建了一个非常好的模板机制,因此我们只需要输入有关产品的一些详细信息(例如正在使用的编译器和某些质量阈值).我想我想保留这个.
  • 是否有从Multijob插件迁移"到管道插件的指南?
  • 我应该记住的是什么? (插件之间的主要区别.)

推荐答案

不是完整的答案,但是:

Not a complete answer, but:

我们在Groovy中创建了一个非常好的模板机制,因此我们只需要输入有关产品的一些详细信息(例如正在使用的编译器和某些质量阈值).我想我想保留这个.

We have a really nice templating mechanism created in Groovy so we only have to enter a few details about the product (like the compiler being used and certain quality thresholds). I think I would like to keep this.

Pipeline中的等效项是创建一个抽象项目的通用方面的Groovy库,并从只是传递不同参数的各种作业的短主脚本中调用它.

The equivalent in Pipeline would be to create a Groovy library abstracting the common aspects of your projects, and call it from short main scripts in various jobs that just pass different arguments.

我应该继续使用Job DSL吗?

Should I keep using Job DSL?

在某些情况下,仍然有理由将Job DSL与管道一起使用:例如,如果您想根据一些计算的标准自动生成一系列作业.

There are still reasons to use Job DSL with Pipeline in certain cases: for example, if you want to automatically generate an array of jobs based on some computed criteria.

这篇关于从Jenkins Multijob迁移到Pipeline插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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