Passing library version to another build Follow
I am pretty new to TC and so this might be trivial, however I was unable to find the answer as of now.
I have two builds, first of which is a library, that on each build as the very first step updates its own version number (in the POM file). Next one is a demo application using this library. I'd like—upon library successful build—to start the demo app build, pass the new version number to it and use it in some files in the demo app. The library build success cannot of course be dependent on the demo app build success.
I believe I can do the first step with the Finish Build Trigger on the library build and the last I suppose can be done with File Content Replacer, however I cannot find out how to pass the library new version number from the trigger to the second build. Is there a way to do so?
Regards, Marcel
Please sign in to leave a comment.
Hello Marcel,
I see a couple of options to solve the problem, both approaches utilize Dependencies:
Regarding Finish Build Trigger: it's fine to use it, but if you are going to create a build chain out of two build configurations, I would recommend having a VCS Trigger at the end of the build chain (provided that both the library and the demo app build configurations use the same VCS Roots). This way, whenever there is an update in your sources, the entire build chain will be triggered. TeamCity will try to trigger a demo app build if there's a suitable library build, otherwise, it will first trigger a library build. The advantage is that there will be no unnecessary builds, and the entire build chain will be always build on the same sources.
I hope this information helps. Let me know if you have any other questions.