Build dependencies

Hi Everyone,

Project Setup

  I have a project setup with a database backend.  I have configured my database change scripts into a specific folder in my source root
for e.g.
$/source - root
$/source/db - scripts.

At each build I restore the database from a backup and execute all schema change scripts sequentially.  After each release I will create a new db backup and use that as my base.

Question
I am looking for a way to setup a build dependencies so that I can achieve the following

Detect if there was a change in the $/source/db scripts folder
If there was a change then kick build A (this will include the database rebuild)
If there was no change then kick build B (this will exclude the database rebuild)
Alternatively skipping a build step is acceptable as well, since I can isolate the database build portion in my Nant script.

Build type selection is to reduce overall time spent on the build.

Is this possible out of the box before I search for API based build triggers (I would prefer to avoid this)

Alternatives
For the moment I would like to keep this architecture of rebuilding the entire db, since I do not care about the data and writing resilient schema change scripts is too error prone.

1 comment
Comment actions Permalink

Hello,

If I correctly understand your use case you can create the follwoing build configurations in TeamCity:
A - restore the database from a backup, VCS trigger on changes in $/source
B - snapshot-depends on A, execute all schema change scripts sequentially, VCS trigger on chages in $/source/db

Will it work for you?

0

Please sign in to leave a comment.