Reputation: 1994
I have implemented continous build using TFS windows workflow. In this I have created a custom activity that will help me creating custom template of folders.
Is there any way that I can monitor the status of the build, that is if the build fails due to some exception I want to set a flag in database table that i created to failed.
I want to handle this in C# TFS API only.
Upvotes: 0
Views: 205
Reputation: 115037
You can use the QueryBuilds
method from the IBuildServer
service API to query all builds inside TFS. You can specify the Build Status as one of the filters, plus a date range when the number of builds in the database grows too large.
Upvotes: 1
Reputation: 13259
Yes, you would need to probably create a custom build activity to enter your record in the database. You would place this custom activity in the template at the very end of the Run on Agent Sequence and check the status of Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed to know if the build failed or not
Upvotes: 1