reevolt
reevolt

Reputation: 807

Teamcity does not start build on git remote change

I'm trying to run build steps on Teamcity 2017.1.1 when changes are made on a git branch. I set up a VCS trigger and changes are seen by Teamcity because each time I commit, I can see on my project that there are some pending changes as you can see in the picture below: Teamcity pending changes

Unfortunately, it does not run the build steps because I need to manually click on "run" to start build...

This is the VCS trigger I set in TeamCity to run build steps when an update is made on the dev branch on the git repository:

enter image description here

What is wrong in my config and why TeamCity does not automatically run build when changes are made?

Thanks in advance

Upvotes: 0

Views: 2552

Answers (2)

nickolay.laptev
nickolay.laptev

Reputation: 2565

You see Pending changes and that means your VCS Root is configured and TeamCity has latest commits. Your trigger configuration looks valid.

So the only possible problem here is that commits are done not for dev branch your trigger is configured.

As a general rule you can do localization of the problem. Try to perform small steps and check current behaviour.

Upvotes: 1

bluescores
bluescores

Reputation: 4677

It looks like you are using a Branch Filter in your Trigger Rules field. There's a separate field when you view Advanced Options that allows you to specify branch filters.

Try removing +:refs/heads/dev from Trigger Rules and replacing with +:root=<your_vcs_root_name>:**. Note your VCS root name is a TeamCity construct, you can find it in the VCS details for your repo. This rule will build any change detected for your VCS root. You can then add +:refs/heads/dev to the Branch Filters field if you want.

Read the TC 2017 documentation carefully. Trigger Rules are one of those gotchas.

Upvotes: 2

Related Questions