how to a start build immediately when there is a change in VCS?
Completed
What is happening:
- I have made a commit to my VCS at 0th min.
- Teamcity is taking almost 1min to detect the change from VCS.
- Teamcity waiting for 1min to trigger the build.
It's taking a total of 2mins to trigger the build.
Expected result:
Help me configure TeamCity to start building immediately whenever there is a change in my VCS.
Please sign in to leave a comment.
Hi,
You can do this either globally, or per build configuration.
In Administration -> Global Settings, there is a couple of related settings, which can help you:
The first one defines the default VCS check interval. Note, that you can override this setting in each VCS explicitly.
The second setting defines how long TeamCity waits before triggering the build once the change has been detected. Note that during the quiet period TeamCity is not just idle; it cross-checks all VCS roots related to the build for changes. You can also override this setting per build configuration in respective VCS Trigger settings:
Please note that setting these values to zero may impact server performance or increase the number of builts made in some cases.
However, the best approach would be to use commit hooks. You can either use own scripts or some existing solutions for the same. The article in our docs gives some examples to start with:
https://www.jetbrains.com/help/teamcity/configuring-vcs-post-commit-hooks-for-teamcity.html