I am trying to work out an efficient setup to ensure that compiling and deploying builds takes priority over running tests. I have a single agent containing two build configurations:
- Build, deploy, high level test (5 minutes)
- Unit tests, integrations tests, smoke tests (15 minutes)
I have configured the triggers such that the build projects runs every time a commit occurs in VCS. What I would like to do is to queue up the test project to run as lower priority. However, if multiple commits are made in a short space of time (a few minutes), I do now want to queue up lots of test projects.
For example, this is what I would like to achieve:
Build/deploy configuration kicked off at:
12:00 (eta 5 mins)
12:05 (eta 5 mins)
12:10 (eta 5 mins)
Test project kicked off at:
12:15 (eta 15 mins)
Where the test project runs just once with the latest deployed code. I do not want to queue up the test project 3 times.
Effectively, I only want to run the test project when the agent is idle and untested changes have been committed. Is this possible? if so, what is the best way to achieve it?