I have a TeamCity project with several types of build configurations:
- Application packages containing various application components and created from various subtrees in version control
- Role-based packages , combining application packages together in different configurations (the application server role has a common code + front end, the web services role has a common code + rear end, etc.).
- Regression test , a series of build steps that deploy role packages to their respective test servers and run the long-running Selenium test package
The goal is for application packages to be built frequently, so we will immediately find out when the unit test broke, role packages will be created as needed, and a regression test will be performed as often as possible when a new role appears for testing packages. But since the regression test takes a lot of time, and only one regression can work at a time (it monopolizes the set of test servers), we always want it to collect the latest available packages at the time of its launch. For instance:
3:00 code checked in
3:01 build app package (A1)
3:02 app package A1 finishes
3:02 build role package (R1)
3:03 role package R1 finishes
3:04 regression starts for R1
3:10 code checked in
3:11 build app package (A2)
3:12 app package A2 finishes
3:12 build role package (R2)
3:13 role package R2 finishes
3:20 code checked in
3:21 build app package (A3)
3:22 app package A3 finishes
3:22 build role package (R3)
3:23 role package R3 finishes
3:30 regression finishes for R1
** regression never runs for R2 **
3:30 regression starts for R3
So far, I have implemented this using artifact dependencies and creating triggers:
- Application packages are launched using a Schedule trigger, limited by the corresponding source code using VCS startup rules. They have no TeamCity dependencies.
- Role-based packages are run using the Build Triggers finalists, pointing to all relevant application packages. Each of them has artifact dependencies in the corresponding application packages (last successful build).
- The regression test is launched using Finish Build triggers that point to all role packages and are limited to run on a single agent. It has artifact dependencies in all role packages.
This works well enough when only one role is restored. But when several roles change at the same time, the regression test starts working as soon as the first role is rebuilt, and then the remaining roles are not raised until this test is completed. I want the regression to start working when the last changed role was rebuilt. (Note: there are more roles than agents, and regression is performed on another agent from the package assembly.)
Snapshot dependencies sound like the tool I need ... but I understand that they make all dependent configurations run from the same VCS revision, and I want to avoid reconfiguring the package if its code has not changed. If the only change today is in a package that affects only the R role, then the S / T / U roles should not be rebuilt, and their dependencies should not. Is it possible?
Edit: I am running TeamCity 7.1.1.
source share