Pre-Tested (Delayed) Commit
Last modified: 20 April 2023An approach which prevents committing defective code into a build, so the entire team's process is not affected.
Submitted code changes first go through testing. If it passes all of the tests, TeamCity can automatically submit the changes to version control. From there, it will automatically be integrated into the next build. If any test fails, the code is not committed, and the submitting developer is notified.
Developers test their changes by performing a remote run. A pre-tested commit is enabled when commit changes if successful option is selected.
The pre-tested commit is initiated via a plugin to one of Supported Platforms and Environments (also a command-line tool is Command Line Remote Run Tool).
Matching changes and build configurations To submit changed files to pre-tested commit or remote run, TeamCity should be able to check that the files, when committed, will affect the build configurations on the server.
If TeamCity cannot match the changes with the builds, a message "Submitted changes cannot be applied to the build configuration" is displayed.
The VCS integration should be correctly configured in the IDE and TeamCity should be able to match the files on the developer workstation to the build configurations present on TeamCity server. In order to be able to do that, VCS should be configured in the same way on the developer's workstation and on the server. This includes:
for CVS, TFS and Perforce version control systems - use exactly the same URLs to the version control server
for VSS - use exactly the same path to the VSS database (machine and path)
for Subversion - use the same server (TeamCity matches server GUID)
for Git - the current checked out branch should have "remote" set to the server/branch monitored by the TeamCity server and should have common commits in the history with the server-monitored branch.
If upon changed files choosing TeamCity is unable to find build configurations that the files can be sent to, option to initiate the personal build will not be available.
Thanks for your feedback!