Answered Problem with running Continuous Integration

  • Wednesday, August 02, 2006 9:17 PM
     
     
    I am going to be running CI, and I forsee some problems that are going to arise.  I am going to be having approximately 26 team build projects that are going to be running on CI.  If each of those are run say 3 times a day - that will leave me with almost 80 entries in the "integration build", "found in build", "resolved in build" fields.  I would like to have these builds ignored, as I have a main build which will "sweep up" all of the work items and change sets.  What is the best way to do this?  fyi, I tried to rename my build to CI but you can't overwrite one with the same name once it has built...

All Replies

  • Thursday, August 03, 2006 6:28 AM
     
     
    Maybe you can accomplish this with a custom task which executes after the build is completed
  • Thursday, August 03, 2006 12:17 PM
     
     
    What should I be trying to accomplish with a custom task that is run after the build completes?
  • Thursday, August 03, 2006 12:29 PM
     
     
    well, if I understood correctly your problem, you want to delete all the entries which are generated by these builds
  • Thursday, August 03, 2006 1:13 PM
     
     
    I noticed that there is a command that you can use to delete build(s) from the server.  Would you recommend that I use this in a custom action or alternatively is there another way that the same result can be done through a custom action. 

    Another thought is that I could create a service which periodically purges the list of all unwanted builds, and then ports the new list to the global list and imports it back onto the server.  Would this be a recommended action; or is the custom action easier to do?

    Thanks for your help.
  • Thursday, August 03, 2006 1:30 PM
     
     
    To add something to my last post, it doesn't matter which is easier - I am looking for which one is preferred.

    Thanks again for all your help.
  • Friday, August 04, 2006 6:02 AM
     
     
    I would implement it in a custom task in the build, using the command you say, or using the object model itself, will be the preferred for me, as you can be sure it executes always after finishing the build, and won't depend on anything else apart from the build.
  • Friday, August 04, 2006 3:26 PM
    Moderator
     
     

    The build numbers are currently stuffed in by a web service which is subscribed to the BuildCompletionEvent.  Probably the best thing for you to do would be to (a) unsubscribe this web service from the BuildCompletionEvent and (b) replace it with a web service of your own creation that filters out the CI builds.  I'll try to post a follow up later today or tomorrow with more specific instructions for how to accomplish this. 

    -Aaron

  • Wednesday, August 09, 2006 12:46 AM
    Moderator
     
     Answered

    The way that works currently is that work item tracking subscribes at installation time to the build completion event via bissubscribe.  Every build that completes is thus added by WIT to its drop down list.  To change what goes into the "integration build," "found in build," and "resolved in build" fields, you'll have to manually alter the event subscription used by work item tracking.

    In Jeff Atwood's blog post on working with subscriptions, his screen shot actually shows the WIT subscription to the BuildCompletionEvent (it's the first one in the screen shot of the results of the SQL query of the subscriptions table).  You'd need to remove that subscription and add a new subscription for WIT that included a filter to only pick up successful builds.

    http://blogs.vertigosoftware.com/teamsystem/archive/2006/07/03/Subscribing_to_Team_Foundation_Server_Events.aspx

    Buck

  • Friday, September 01, 2006 6:42 PM
     
     
    I've been trying to get this right, but I can't seem to get it to work.  Are there any references for writing filters for these things?
  • Tuesday, September 05, 2006 4:46 PM
     
     Answered

    Hi Johnny,

    I just finished a blog post that provides a simple filter for the BuildCompletionEvent. Please, check it out and let me know what type of filter you are interested in.

    link: http://blogs.msdn.com/jpricket/archive/2006/09/05/741260.aspx

    Thanks, Jason

  • Tuesday, September 05, 2006 5:13 PM
     
     
    Thanks Jason,

    In particular, I would like a filter that would only display the builds from 1 build project

    i.e. BuildProjectName = myBuild

    Is there any way to do this?

    Thanks,
    Jon

    P.S. Can you not go into the SQL table tbl_Subscription and edit the event in there?
  • Tuesday, September 05, 2006 5:37 PM
     
     

    Don't edit the SQL table directly! That is definitely not supported.

    I assume that BuildProjectName == Build Type Name (the things that show up in Team Explorer)?

    I will work on an example and post it here for you to try.

    Thanks, Jason

  • Tuesday, September 05, 2006 6:43 PM
     
     

    Okay, I think I have the filter that you want.

    If you want only successful builds from one build type (here called Nightly), you can use the following filter:

    "\"Configuration\"='Nightly' AND \"CompletionStatus\"='Successfully Completed'"

    I will add a blog entry with this filter and several other useful ones.

    Thanks, Jason

  • Tuesday, September 05, 2006 7:02 PM
     
     
    Thanks a lot Jason; I'll give it a shot.

    Jon