2 Branches, 2 different Builds, both have problems
hello,
i am desperate now and after trying everything, I hope to find some help here.
please let me explain:
I have one git repository with 2 branches:
- php7
- php8
for both branches I created two different build setups:
php7
Default branch: refs/heads/php7
Branch specification:
+:refs/heads/(feature-*)
+:refs/heads/(WT-*)
-:refs/heads/php8
excluding php8 here is just a test of mine, I know it shouldn´t be needed.
Branch Filter:
+:refs/heads/WT-*
+:refs/heads/feature-*
+:<default>
-:refs/heads/php8
same here...
php8
Default branch: refs/heads/php8
Branch specification: <empty>
Branch Filter: +:<default>
I don´t use any triggers, teamcity is fetching every X seconds for changes.
here´s the problem:
when I push something to branch php8, the following happens:
- the build-setup for php8 does nothing, I only see a new entry in the "Pending Changes" Tabs, there I have to run the build manually so that the build finally gets started
- the build-setup for php7 gets an error with
Unable to collect changes
Failed to collect changes, error: Builds in php8 branch are disabled in build configuration
which is not totally wrong, but the problem is:
- I get a slack notification with that error every time I push something to php8
- I see an error in my php7 build list every time, but it shouldn´t listen at all to php8 pushes
so my goal is:
- php8 builds should start as it does with my php7 (and I don´t really understand why my php7 build works, and my php8 not, because I copied php8 from php7)
- php7 should not get triggered at all if anything happens inside the branch php8
my teamcity is not up to date, sorry: TeamCity 2021.2.3 (build 99711)
but my feeling tells me, it´s not a bug, more a problem with my configuration.
thanks for any help!!
Please sign in to leave a comment.
correction: my version is: 2021.1.1 (build 92714)
This was handled privately. The core issue was the use of gitlab integration instead of teamcity triggers, which caused triggers in the wrong places. Disabling the integration and moving the triggers to teamcity fixed it.
pardon, i missed to answer my problem here. correct. the main problem with the teamcity-integration that exists inside gitlab is, that you can only use one teamcity-build-config. so doesn´t matter which branch gets a push - the trigger will always send a notification to the same teamcity-build. the only way to solve that issue is:
- gitlab: disable the teamcity integration
- teamcity: switch to polling (with that branch the build is made for)
and more important: enable "VSC Trigger", without this trigger enabled, no build will get started.
maybe the trigger got disabled by gitlab, i don´t know, but it took me quit a while to find out, that this needs to be enabled (again) so builds will run automatically.
with that, i am now able to have different build for different branches.