Configuring Build Triggers
Last modified: 20 April 2023Build trigger is an event that initiates a new build. The build is put into the Build Queue and is run when there are idle agents that can run it.
For each build configuration you can configure the following triggers:
Configuring VCS Triggers: the build is triggered when changes are detected in the version control system roots attached to the build configuration.
Configuring Schedule Triggers: the build is triggered at a specified time.
Finish Build trigger: the build is triggered after a build of the selected configuration is finished. If corresponding checkbox is enabled, a build is triggered only after successful build of the selected configuration.
tip
Note that if build configuration with "Finish build trigger" has snapshot dependencies to selected build configuration, the trigger will run build on the same revisions and will attach build to the chain. Thus you can have automated promotion of builds in chain.
Configuring Maven Triggers: the build is triggered if a specified Maven artifact has changed.
Configuring Maven Triggers: the build is triggered, when any of the snapshot dependencies is updated in the remote repository.
Retry build trigger: the build is triggered if the previous build failed after specified time delay.
Branch Remote Run Trigger: personal build is triggered automatically each time TeamCity detects new changes in particular branches of the VCS roots of the build configuration. Supports Git and Mercurial.
NuGet Dependency Trigger: starts a build if there is a NuGet packages update detected in NuGet repository.
While creating/editing a build configuration you can configure these triggers at the Build Triggering page by clicking Add new trigger. For configuration details on each trigger, refer to corresponding sections.
tip
Note that if you create a build configuration from a template, it inherits build triggers defined in the template, and they cannot be edited or deleted. However, you can specify additional triggers or disable a trigger permanently or temporarily.
In addition to the triggers defined for the build configuration, you can also trigger a build by an Accessing Server by HTTP, or manually by running custom build.
Thanks for your feedback!