本文介绍了快照依赖 - 不要对依赖运行挂起的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有三个构建配置

  1. 构建和运行测试
  2. 质量检查构建
  3. 生产构建

QA 依赖于构建和运行测试.生产取决于质量保证.

QA depends on Build And Run Tests. Production depends on QA.

正常的工作流程如下.

  1. 提交更改
  2. 构建和运行测试自动运行
  3. 手动运行 QA Build.
  4. QA 批准更改
  5. 手动运行生产构建.

这很好用.但是,让我们假设在第 3 步和第 5 步之间的某个时间提交了一个更改.所以现在我有 1 个等待 QA 的更改和 2 个等待生产的更改(其中 1 个已由 QA 批准).

This works great. However, let's assume a change is committed some time between step 3 and 5. So now I have 1 change pending for QA, and 2 pending for Production(1 of which is approved by QA).

如果我单击 TeamCity 中的运行按钮,它将运行 QA 版本的待定更改和生产版本的两个更改.

If I click the Run button in TeamCity, it will run the pending change for the QA Build and both changes for the Production Build.

如果我单击运行按钮上的...",然后我可以单击更改"并选择要包含在此构建中的特定修订.但是,这并没有向我显示当前处于 QA 中的修订版.所以现在我必须检查 QA 批准了哪个修订版,并确保我选择了正确的修订版.

If I click the "..." on the Run button, I can then click "Changes" and pick a specific revision to include in this build. However, this does not show me which revision is currently in QA. So now I have to check which revision QA has approved and make sure I pick the correct one.

是否有类似 Artifact Dependencies 的工作方式?我可以指定上次完成"或上次固定".这将确保未批准的更改不会包含在构建中.

Is there something like the way Artifact Dependencies work? In that I can specific "Last Completed" or "Last Pinned". This will ensure that unapproved changes are not included in a build.

推荐答案

在这个特定的场景中,你应该定义 快照依赖21,从32.当 QA 愿意测试 1 制作的工件时,他们可以转到 1、23 的 ">构建链" 选项卡(如@neverov 刚刚提到的)并运行 23 从那里手动.这确保在所有链步骤中使用相同的更改.

In this specific scenario you should define snapshot dependency from 2 to 1 and from 3 to 2. When QA is willing to test artifacts made by 1, they can go to the "Build Chains" tab (as @neverov just mentioned) of either 1, 2 or 3 and run 2 and 3 manually from there. This ensures same changes are used in all chain steps.

您还可以在这些配置之间定义工件依赖(来自21 和从 31) 以便将 1 构建的二进制文件传递给23 无需重新创建.

You can also define artifact dependency between those configuration (from 2 to 1 and from 3 to 1) so that binaries built by 1 are passed to 2 and 3 without having to re-create them.

这篇关于快照依赖 - 不要对依赖运行挂起的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 15:55