lundi 25 janvier 2016

TeamCity Snapshot Dependencies without triggering rebuild

TLDR: How can I arrange it so that a snapshot dependency does not trigger new builds?

For my test processes to run, they need to run on a "Test" environment. Creating such an environment is simple, but lengthy; it can take as much as 45 minutes to an hour to finish building a test environment. Further, the name of the environment, and other such variables, is not fixed until the environment has finished building.

In my TeamCity build definition, I could put "build environment if missing" as a build step. However, that means that the first test of the day will take 45 minutes to run.

Instead, we created a separate build, that is scheduled to run every morning, that builds the test environment for the day. Our test build then has a snapshot dependency to that build in order to use the parameters of that build to determine the environment information, and everything works as expected, except for one issue:

When a new test is run, it frequently seems to trigger a rebuild of the test environment creation.

We don't want this to ever happen; the test environment creation is 'done' for the day and should not need to run again until tomorrow. How can we achieve this?

Aucun commentaire:

Enregistrer un commentaire