devops - Uniquely identifying staging releases and understanding CI/CD pipeline
问题描述
I am trying to create the following CI/CD pipeline for a sbt
project, although the idea is agnostic of any language:
main <-(A)- staging <-(B)- develop <-(C)- features/feature-x
Here, A
, B
, C
identifies following workflows:
Workflow C:
Idea of this workflow is to be able to continuously merge fixes/features to the develop
branch.
- perform unit/integration tests
- get code reviewed by code owners
- publish artifacts to the snapshot OSSRH
Workflow B: When there are enough fixes/features in the develop
branch, code-owners could decide to merge this branch to staging
branch
- perform unit/integration tests
- push artifacts to staging server
Note: Here QA comes in to test the staging release.
Workflow A: When a staging release has passed all QA tests, it will be released for public
- perform unit/integration tests
- release staging artifacts
- publish release notes
I have couple of questions related to this pipeline:
Let's say staging release is identified as v1.2.0. Now QA finds a couple of issues in this staging release and the development team fixes and republished the staging release. My question is if we continue to keep the same version, how could we identify if we have a newer staging release? (I had been referring to the Sonatype docs to release to snapshot/staging repo) One way I could think of to uniquely identify newer publishes is by using commit id but that doesn't look intuitive or we could bump up the version number but that wouldn't be correct wither. Another way I could think of is using pre-release prefixes like "-RC" but even these are meant for public releases. See here.
How would this pipeline look like when we have to support multiple releases? Let's say, we have made public releases
1.2.0
,1.3.1
and2.3.1
. In this case, we may have to support all the releases such as1.2.x
,1.3.x
and2.3.x
independently.
Would it look like this?
main1.2.x <-(A)- staging1.2.x <-(B)- develop1.2.x <-(C)- features/feature-x
main1.3.x <-(A)- staging1.3.x <-(B)- develop1.3.x <-(C)- features/feature-x
main2.3.x <-(A)- staging2.3.x <-(B)- develop2.3.x <-(C)- features/feature-x
- How would we deal with merging changes from say
1.2.x
to2.3.x
and so on? - Won't this may cause merge conflicts every time we may merge?
- There could be chances we won't want to merge those changes to newer branches, right?
Anything you would like to suggest to improve this pipeline?? Could you point to documents/books that discusses and explains cicd pipeline and release versioning in depth?
解决方案
推荐阅读
- mysql - GROUP_CONCAT() 和 GROUP BY 中的 SUM()
- java - 完美的 url 正则表达式
- swift - “无法在此文件中预览 - 无法启动 [应用程序名称]”
- python - 删除整数和句号之间的空格
- r - R中的For-If循环操作
- php - 从 FTP 数组返回的 PHP 数组排序列表
- php - PHP标签内的PHP标签,有替代方案吗?
- flutter-test - 颤振中的错误:widget_test.dart 无法检测到 MyApp()
- node.js - 向不与我的机器人共享服务器的用户发送消息
- python - 如何理解一维数组和二维数组的 numpy dot 生成的维度变化?