Reputation: 2654
Setup: Build CD
has has Artifact Dependency and Snapshot Dependency on Build CI
. Build CI
pulls from VCS root and generates artifacts for Build CD
.
Problem: In Build CD
I need %teamcity.build.branch%
parameter, but it's not available, because it only uses artifacts and has no VCS Roots linked.
Question: Is there a way to pass parameters between dependant builds? (search results in the googles seem of topic)
Workaround 1: I can access %teamcity.build.branch%
in Build CD
if I link it to same VCS root Build CI
is using, but I'd like to avoid having this link and Build CD
unnecessarily pulling from VCS (build log shows it does this).
Workaround 2: I could write parameter to a file in Build CI
and read from it in Build CD
later. This is a hack and I would like to avoid it as well.
Upvotes: 1
Views: 2270
Reputation: 3249
Absolutely. In CD
, add a parameter called whatever, with value equal to %dep.Build_CI.teamcity.build.branch%
. TeamCity will help you figure out the exact value thanks to its auto-suggestion/auto-completion, once you type %dep.
.
Upvotes: 3