Jenkins-一个发行版有多少CI/CD管道? [英] Jenkins - How many CI/CD pipelines for a release?

查看:222
本文介绍了Jenkins-一个发行版有多少CI/CD管道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Git工作流程下使用任何版本,

Using below Git work flow, for any release,

对于连续交付,我的理解是,需要创建两条詹金斯管道,如下所示:

For continuous delivery, my understanding is, two Jenkins pipe lines need to be created, as shown below:

1)构建管道,该合并管道在每个功能分支(绿色)合并为 Develop 分支(紫色)时触发.管道将在Nexus存储库中推送product-x.y-snapshot.jar. 这个jar的目的是进行质量检查

1) Build pipeline that gets triggered on merge of every Feature branch(green) into Develop branch(Purple). Pipeline will push product-x.y-snapshot.jar in Nexus repo. Purpose of this jar is for QA testing

2)发布管道,该管道在每个新的 Release 分支合并到 Master 分支时触发.管道将在Nexus存储库中推送product-x.y.jar.这个罐子直接投入生产.

2) Release pipeline that gets triggered on merge of every new Release branch to Master branch. Pipeline will push product-x.y.jar in Nexus repo. This jar goes in production directly.

两个管道均对每种功能进行自动测试. 在两个管道中运行相同数量的自动测试

Both pipelines have auto-tests for every functionality. Same number of autotests run in both pipelines

1)是否有两个管道足以稳定释放? product-x.y.jar 在该版本中添加了新功能

1) Does two pipelines suffice for stable release? product-x.y.jar with new features added as part of that release

2)如果是,那么必须如何为构建和发布管道维护二进制工件?使用Nexus ...请提供任何参考

2) If yes, How binary artifactory has to be maintained for both build and release pipeline? using Nexus... please provide any reference

推荐答案

1)这个问题没有一个正确的答案-在大多数情况下,两个管道(一个用于 feature 分支,另一个用于 master 分支)足以创建稳定的发行版,但是团队通常使用三个暂存环境(例如,请参见

1) This question doesn't have one right answer - in most cases two pipelines (one for feature branches and other for master branch) is sufficient for creating stable releases, but usually teams use three staging environments (for example, see details in this article):

  • 开发环境:用于进行 develop (或功能)分支并运行自动化测试;
  • 质量检查环境:用于提供质量更为稳定的版本以供质量检查小组进行测试;
  • 产品环境:用于构建当前位于 master 分支上的可投入生产的代码.
  • Dev environment: for working on develop (or feature) branch and run automation tests;
  • QA environment: for providing a more stable version of the code for testing by QA team;
  • Prod environment: for building production-ready code that is currently on the master branch.

在这种情况下,对于每个登台环境,您可以具有三个管道(或者一个具有用于选择和构建每种类型的环境的参数的管道).互联网上有很多Jenkins连续交付配置的示例.

And in that case you can have three pipelines for each staging environment (or one pipeline with parameters for choosing and building each type of environment). There are a lot of examples of Jenkins continuous delivery configuration in the internet.

2)如果我对您的理解正确,则可以使用示例)或 Nexus工件上传器,用于将特定的工件从Jenkins发布到Nexus.

2) If I understand you correctly, for maintaining artifacts you can use Nexus Platform Plugin (see this example) or Nexus Artifact Uploader to publish a specific artifact from Jenkins to Nexus.

这篇关于Jenkins-一个发行版有多少CI/CD管道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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