Build triggers


Hi

I have an issue with teamcity and build triggers. My problem is that I have 2 build configurations which are using the same github repository.

Build configuration 1 is meant to build all branches except branch x.

I have configured build configuration 1 with a trigger which have

Vcs trigger = +:.

Branch filter = +:*

                      -:branch X

The build configuration 2 has a trigger with the following trigger conf

Vcs trigger = +:.

Branch filter = +: branch X

The problem is that build configuration 2 isn’t automatically creating a new build when a commit is detected. It just says pending on the frontpage, so it is detecting the commit. Build configuration 1 is ignoring the commit which is correct, but the commit is also set pending on build configuration 1.

How can I make build configuration 2 automatically build ?

Thanks in advanced

11 comments
Comment actions Permalink

Hello,

Please check that "branch X" is a logical name of the branch.
If it is not the case, then please attach screenshot of VCS trigger settings, screenshot of pending changes screenshots depicting that the build should be triggered, but is not (build configuration overview with "Show canceled and failed to start builds" option ON; pending changes; existing builds details with "triggered by" field) and teamcity-vcs.log.

0
Comment actions Permalink

Hi

I belive that the name branch x is the logical name. Branch X is the name you select in the dropdown on github. Branch x doesn't contain any "/ref/" informations.

I have attached the screenshots you have asked for, but I couldn't find the triggered by information that you wanted. I need some help to find the triggered by information if you still need it

Edit: BTW we are running version 9.0 build 32060)



Attachment(s):
teamcity-vcs.log.zip
vcs_settings.PNG
tc_overview.png
0
Comment actions Permalink

Were these changes committed after the VCS trigger was configured?
Could you manually run the build on "sanovo-shop" branch using "Run..." > Changes > Branch? What branch name do you see on the build configuration overview page?

0
Comment actions Permalink

Hi

yes the changes was commited after the last change of the vcs trigger. We have no trouble using the manual run procedure you mentioned. That how we have been doing for the last 6 months. We also had the problem on teamcity 8.X and wanted to upgrade before reporting this issue.
I can't see any branches on the manual build popup, only commits for that branch. See image.

I'm not seeing any branch on build configuration overview page. I can see branches on build configuration overview page for other builds configurations which has multiple branches.



Attachment(s):
manual_run.PNG
0
Comment actions Permalink

Have you configured Branch specification for this build configuration? Please attach screenshot of considered VCS root: Default branch and Branch specification.

0
Comment actions Permalink

I have configured the default banch, but the branch specification is empty. See image



Attachment(s):
branch specification.PNG
0
Comment actions Permalink

Please configure the default branch like this: refs/heads/sanovo-shop. You can find more details about git structure here.
In this case build configuration monitors only one branch, so you can leave trigger branch filter empty.

0
Comment actions Permalink

I changed default branch to refs/heads/sanovo-shop and created a new commit. No change the builds is not triggered.

0
Comment actions Permalink

Have you cleaned branch filter in VCS trigger?

0
Comment actions Permalink

no - I hadn´t remove the branch filter in VCS trigger. I have now removed it and it is working :) If I want to monitor multiple branchs, do I have to enter the other branches in build configuration "Branch specification"?

0
Comment actions Permalink

Yes, if you want this build configuration to monitor more than one branch then you should enter these branches to Branch specification.
If you want VCS trigger to trigger build not for all branches, but only for some of monitored ones, then you should configure VCS trigger Branch Filter. In branch filter you should specify logical branch names matched by branch specification (i.e. displayed for a build in TeamCity UI).

0

Please sign in to leave a comment.