Best practice for branch-specific Schedule Triggers in a build chain without VCS
Hi,
I'm setting up a deployment pipeline for a game build and want to make sure I'm following TeamCity best practices.
I have build configuration A (Unity PC build) and build configuration B (Upload to Steam) that depends on A. I associated a VCS root (Git) with configuration A. For now, I've also associated the same VCS root with configuration B, but set the VCS checkout mode to "Do not checkout files automatically". This successfully allows me to use branch filters on configuration B's triggers.
I was wondering if there is a better or cleaner way to do this. In reality, I don't need build B itself to run “on” a specific VCS branch (ie featureA), I only need it to trigger its dependency (build A) on featureA and then upload the result. Anther problem with this solution is that I am not able to attach another VCS root to my build B to retrieve the Steam Upload code from a git repository for example.
I tried completely removing the VCS root from build configuration B. When triggered manually, it properly runs build A on a specific branch that I can specify on the Changes Tab. However, when I try to configure a Schedule Trigger on build conf B without the VCS root, it doesn't work; if I specify a branch filter (like +:featureA), the schedule won't trigger at all.
Is keeping the "dummy" VCS root with disabled checkout the standard best practice here, or is there a better way to structure this scheduled dependency?
Hope that's clear enough, and thanks in advance for your help!
Please sign in to leave a comment.
I don't see a problem with your approach.
>> Anther problem with this solution is that I am not able to attach another VCS root to my build B to retrieve the Steam Upload code from a git repository for example.
This should not be a problem. Build configurations can have multiple VCS roots attached. You can add a new VCS root in BuildB Settings > Version Control > Attach VCS Root. And checkout this VCS Root if needed.
Best regards,
Anton
Hi, my current config is:
If I attach the “SteamUpload code” VCS to Build Config B, am I correct in assuming it won't perform a checkout?
Harold.
Thanks for the details.
It is possible to keep BuildB with the “Do not checkout files automatically” checkout mode, and checkout the “SteamUpload code” VCS root in the build step.
Alternatively, you can set BuildB to use automatic checkout, and use checkout rules for the first VCS root to exclude files from it: https://www.jetbrains.com/help/teamcity/vcs-checkout-rules.html
Best regards,
Anton
Hello,
Thank you for your response. I'll configure my builds that way then. I just wanted to follow best practices.
Best regards,
Harold