问题
Assume I have three build configurations
- Build and Run Tests
- QA Build
- Production Build
QA depends on Build And Run Tests. Production depends on QA.
The normal workflow is as follows.
- Commit change
- Build and Run Tests runs automatically
- Run QA Build manually.
- QA approves changes
- Run Production Build manually.
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).
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.
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.
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.
回答1:
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.
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.
来源:https://stackoverflow.com/questions/9982496/snapshot-dependency-dont-run-pending-changes-on-dependencies