How do I ensure that prefabricated city buildings for the same project are configured in a specific order?

My setup: one project with two build configurations ("ci" and "reset dbs")

  • "ci" is just a regular build of the project

  • "reset dbs" uses the same VCS, but only triggers are built in the "common \ database" folder (starts reset of the databases needed for tests) (trigger pattern: +: common / database / **)

Now - I would do this when I check things in the "database" folder - the "reset dbs" build is always run before the normal "ci" build.

Now I have set the "ci" quiet build period to be the same as the poll interval for VCS, which SHOULD give me that "reset dbs" always works first?

It seems to work so far (a couple of tests), but I want it to fix completely.

Is there a better way to do this?

I see another way to do this, to copy the "ci" config and call one of them "ci after reset" which is triggered after the reset build. And then let the usual "ci" exclude the "database" folder. Feels like a hack.

Thanks!

Update. The whole idea is that you don't need to run "reset dbs" for every commit, but only when needed - in which case it should run before building "ci". Thanks for the answers so far!

+1


a source to share


3 answers


You can set up a "reset dbs" configuration triggered by checkin (the default) and have a "ci" configuration triggered by the completion of a "reset dbs" configuration (called a "dependency").



+1


a source


I don't know if it resolves it, but in the tab under the Build heading the tab is launched. There, you can select the build to run before the current build.



+1


a source


In the latest versions of teamcity, you can adjust the build priorities. This might solve your problem like this:

  • Configure "ci" and "reset dbs" to fire when they should use build trigger templates (as you might imagine). Triggers should indicate that changes to the database folder trigger both configurations.

  • Go to Build Queue β†’ Configure Build Priorities. Now let's have a higher priority "reset dbs".

+1


a source







All Articles