Jeremy Smith
Jeremy Smith

Reputation: 1469

Ignore tags by specific user in TeamCity

TeamCity is currently configured to label successful branch builds, however, it's also configured to build when changes are committed to the branch.

Can the build configuration be configured to ignore changes made by the build agent user?

Upvotes: 3

Views: 631

Answers (2)

neverov
neverov

Reputation: 1293

You can do that usign trigger rules like following:

+:.
-:user=commiter-vcs-name-to-skip:.hgtags

Upvotes: 5

Steve Barnes
Steve Barnes

Reputation: 28370

Files output by your build agent can be:

  1. Intermediate Files - like *.o for compiled languages - There is no point in keeping these so they should be in your ignore list rather than under your source version control.
  2. Temorary files - e.g. build agent working files - These should be in your ignore list anyway.
  3. Valid files that for one reason or another have to be altered temporarily by the build process, e.g. if you have an automatic version number generation into a file that is normally showing the version as a test build, these should be reverted by your build system at the end of both successful and unsuccessful builds so will not be different.
  4. Output Files *- like *.exe for compiled languages -* These should be in your release management system not your source version control so should also be in your ignore list.

If all the above is set up there should be nothing to even consider checking in to your source control system at the end of a build so it doesn't become an issue. Your release manager may wish to add the results of the build to the release management system after testing, etc.

You should be able to configure your build so that a change in .hgtags is not a reason for building again as was pointed out here by: Adding the trigger pattern:

-:/.hgtags

filters out the .hgtags file from the build trigger. This is the file that gets modified when the source is tagged by TeamCity. When this file is excluded tagging operations will not fire the build trigger.

Upvotes: 1

Related Questions