Conditional Artifact Dependencies
I know that conditional build steps are not possible but what about conditional artifact dependencies?
I have a build configuration that is setup to make builds for each active git branch. For example, if someone pushes to branch 'A' then a build just for branch 'A' runs.
As part of the build process I would like to make some performance measurements and compare these measurements against previous measurements from the same branch.
So, I need a way to obtain the performance measurements from a previous build. To do this I write the data to a json file and publish it as a build artifact. I then have an "Artifact Dependency" set up to collect this json file from the last successful build from the same branch (%teamcity.build.branch%).
A problem occurs when a new branch is created. It does not already have such an artifact. The entire build fails to even start because TC cannot find an artifact on that branch. It can't find the artifact because no build has ever existed on this branch before.
I would like some kind of conditional test; if there is no artifact to collect then just continue on. Ideally, I'd love for TC to pull the artifact from the master branch if it does not already exist on the branch in question.
Thank you for any help...
Please sign in to leave a comment.
Hi,
we have this feature request for it: https://youtrack.jetbrains.com/issue/TW-19132. Please watch and vote for it.
In the meantime, I'm afraid that running manually a build that generates such an artifact is the only option.