Assign failure responsiblity to last modifier of the compile failed file

I am looking at adding post build scripts that can parse the build error and determine the files that caused
the compile error and determine who modified that file at the change the build was started and assign the
failure responsibility to that user. We are using perforce with TC.

Also in cases where it is not a compile issue I want to assign responsibility to all users whose changes
went in to this build. Could you please let me know if this could be accomplished.


Comment actions Permalink

This can be done with help of plugin to TeamCity. For example, in a build script you could determine which file is broken and publish this information as artifact of your build (this can be done asynchronously with help of service messages: Server side plugin watches for an artifact and analyzes changes since last successful build (SBuild:getChanges(SelectPrevBuildPolicy policy, boolean includeModificationsIfPreviousBuildIsAbsent)).

Once you determined who broke the build you can assign responsibility with help of BuildType:setResponsible(User user, String userComment) method. Note that responsibility is assigned for the whole build configuration, not for the particular build.

However there are tricky moments in determining who to blame. For example someone could forget to add a file to SCM and this caused build failure. It is not clear how to determine who is responsible in this case especially if there is more than committer in the build.

Pavel Sher

Comment actions Permalink

Thank you Pavel. I will give that a try



Please sign in to leave a comment.