How to make teamcity not cleanup artifacts from last non history build?
Suppose I have 2 build plans. A provides an artifact used by B. B uses an artifact depedency on A. B builds use the last non-grayed out builds from A (not sure why it skips ths more recent history builds which are grayed out but also provide valid artifacts). Clean up rules on A always remove artifacts after a day. This makes B builds fail.
How can I change the clean up to not remove artifacts from the last succesful non history build of A
or
How can I make B use artifact dependency from history/grayed-out builds?
Please sign in to leave a comment.
Clean up rules by default keep everything, so you have tweaked them to delete the artifacts. Simply modify the clean up rule to ensure that it won't clean those one up. Also consider using build-pinning if you want to use some specific build: https://confluence.jetbrains.com/display/TCD10/Pinned+Build
History builds are builds ran on older commits that the last one which was built. They aren't usually interesting so they are tagged as history and several restrictions apply to them: https://confluence.jetbrains.com/display/TCD10/History+Build
If you want to ensure the last build, you might want to add a snapshot dependency from B to A and select the artifact from the same chain. That way you will be able to select the commit you want to get on B and ensure that the artifact from A will be matching.