"Builds in default branch are disabled in build configuration"
Answered
I have two repositories:
- with source code
- deployment-specific configurations
I need to watch changes from the repository with source code, then pull changes from both of them, i.e. on the checkout rules I have +:. => src/ and +:. => config/ then I need to run build and if build is successful run deployment phase using configs from config. But for some reason, Teamcity complains "Builds in default branch are disabled in build configuration". If I leave the only one repo them there is no such error. Does anybody know a fix or maybe I have to use another approach?
Please sign in to leave a comment.
Hello Dmitry,
Could you please confirm your TeamCity version? How is the build in question being started? If it is a trigger-based execution, could you please provide me with a screenshot of the trigger settings?
Hello Fedor,
I'm using TeamCity Enterprise 2020.1.1. Below are my settings:
Hello Dmitry,
As I understand, feature/prod-deployment branch is present on the sources VCS root. Could you please let me know what is the VCS root configuration for the second VCS root? Is there the same branch present?
Code-wise, this message would occur when a build is trying to use branch which is not allowed by branch filter.
I have a similar issue.
My VCS root spec is:
Default branch is "develop"
In my build configuration branch filter is
Then when I try to run the build I get - Builds in the default branch are disabled and build configuration doesn't have any other branches. If you run a build, it will fail
When I change the branch filter to just +:* I see all my branches including "develop". So why doesn't it work with refs/heads/(*) ?
Is there anything I'm missing?
(Teamcity version is 2020.2 RC)
Hello Oleksandr,
Am I correct to assume that the default branch is defined as
? In this case, branch filter would never find it because you are looking for a logical name, not for a full reference. To work around that, you could explicitly include develop branch into the specification like below:
This will ensure the develop branch is available under its logical name and the filter will process it properly (please see this article on the default branch details: https://www.jetbrains.com/help/teamcity/working-with-feature-branches.html#Logical+branch+name).
Please let me know if this helps with the issue or if there is anything else I could assist with.
Hi Fedor,
Sorry for a slow response.
Unfortunately it didn't help. I tried different ways of specifying the default branch, but TeamCity keeps saying that no branches are found.
See the screenshots.
Branch Specification
Branch Filter
Run a build
Hello Oleksandr,
I am most sorry for the misinformation; the default branch in scope of the branch filter should be referenced as
I have just checked it locally:
Please let me know if this configuration works for you.
That works. Thank you