snapshot dependency behavior

Hi All.

my requirements for Teamcity is like this.

  • i got 2 build configurations. one for MyLib, one for MyApp.
  • MyApp has to use artifact of MyLib.
  • MyApp has to refer MyLib 's header files
  • MyLib and MyApp is changing concurrently


I've setup 2 VCS roots: VCS_MyLib, VCS_MyApp
Build_config_MyLib use VCS_MyLib and triggered when there is VCS changes.
Build_config_MyApp

  1. uses VCS_MyLib & VCS_MyApp to refer VCS_MyLib header files. (is this standard way to do this ??)
  2. has snapshot dependency on Build_config_MyLib
  3. has artifact dependency  on Build_config_MyLib.


When i add artifact dependency, TemCity says "Snapshot dependency is configured for the selected build configuration.         To obtain artifacts from a build with the same sources you should select "Last finished build". why can't set "Last successful build" ?
It means even MyLib build broken, MyApp have to use broken binaries ?

Let me clear about this ...
Thanks in advance.

1 comment
Comment actions Permalink

Snapshot dependency between two builds means they will run on the same sources. If you add artifact dependency for a build configuration to which you already have snapshot dependency most likely you want to get artifacts from the build with same sources. If you'll use last successful, then chances are that last successful build will not have same sources, that is why last finished rule should be choosen.

So it does not mean use broken binaries, it means use artifacts of the correct build. If you do not want to run build if dependency fails - you can set corresponding option in snapshot dependency. You can also force rebuilding of the dependency if it failed (see option "Only use successful builds from suitable ones").

0

Please sign in to leave a comment.