We are using continuous integration as part of our build automation. For every check in, the tfs build server builds the project and deploys to our web servers on success.
When the build fails, it automatically creates a new Bug with the details of the build failure.
Due to CI and the activity on the server, this might result in 10 or 20 failure work items before the build starts succeeding again.
So, I have two options. I’d like to either have the build process see if an open work item already exists for a build failure and just add details to that; OR, I’d like the build server to close all of the build failure items automatically when it starts working again.
Any ideas?
You can create a MSBuild Task to do either of these options. Here is a similar piece of code I use to get you started but since I don’t know the details of your work item or process you will have to change it.
This code takes all of the work items associated with a build and updates their status.
If you select your first option you can just change the UpdateWorkItemStatus method and update any existing WIs. For the Second method you will need to do a bit more work as you need to look up the prior build rather than take it as a input.