locked
Undoing checkout RRS feed

  • Question

  • Hi everybody,

    I'm trying to implement a continuous integration process here, and I'm using the following article as a baseline: http://dougrohm.com/cs/articles/56.aspx

    There's one thing there that's giving me problems, though. In one of the steps on the process described on the article, a "version.txt" file gets checked out, modified, and then checked in when the process is done. If there's a problem and the build process fails, the file never gets checked back in.

    Then say the problem with the build got fixed. In theory, the next build should succeed. However, it's failing  because it can't check the version.txt file out, since it's already checked out.

    My main question is: can I trap when the build process fail and then undo the VSS checkout on that file?

    Thanks in advance,

    Claudio

    Wednesday, May 31, 2006 3:57 PM

Answers

All replies

  • Nice. Just got a book here on MSBuild, and immediately found the answer: the OnError element is what I was missing.
    Wednesday, May 31, 2006 5:08 PM
  • What book did you get?

    Sayed Ibrahim Hashimi
    www.sedodream.com
    Wednesday, May 31, 2006 5:51 PM
  • lemme see... hmmmm... as a matter of fact, it's your book.  :)

    I've read your article on MSDN, which I'm using as a starting point to write some custom msbuild tasks here. Great article, by the way.

    For anybody following the thread, here's a link to the book:

    http://www.amazon.com/gp/product/1590596528/qid=1149265971/sr=11-1/ref=sr_11_1/104-6706404-8029533?n=283155

    and here's a link to the article:

    http://msdn.microsoft.com/msdnmag/issues/06/06/InsideMSBuild/

    Most likely I'm gonna be all over this forum on the next few days as I'm working on our continuous integration process here.  :)

    Friday, June 2, 2006 4:35 PM
  • Sweet! Just checking, thought it was still the only book with significant MSBuild material. Thanks for the links!

    Sayed Ibrahim Hashimi
    www.sedodream.com
    Friday, June 2, 2006 6:17 PM
  • Congratulation with the brilliant book! I found it on Apress site and after reading TOC decided that I could not wait for printed copy, so I bought PDF version and immediately started reading. I am really impressed with it's clarity and depth.

     

    Thanks for the excellent job, and for helping people in this forum.

    Vagif Abilov
    Oslo Norway

    Saturday, June 3, 2006 5:44 PM
  • Glad to hear that you liked the book. Thanks for the nice words.

    Sayed Ibrahim Hashimi
    www.sedodream.com
    Saturday, June 3, 2006 7:12 PM
  • Sure.

    Here's a question I have now: I want to implement the basic task of whenever the build fails, I want to send out an email, with the build log info attached to it (or added to the message body). On chapter three of your book you briefly mentioned it, but I don't see how to actually implement it.

    Sending the email isn't a problem (got that covered using the community tasks...). I'm having a hard time trying to get the build log info and send that with the email.

    Any help there is highly appreciated.  :)

    Tuesday, June 6, 2006 4:33 AM
  • Hi,
    You're not the first to ask this question :) I've posted a detailed entry on my blog a while ago about exactly how to achieve this. Have a look at:
    http://www.sedodream.com/PermaLink,guid,48b277b0-9d2f-4eb0-8186-f0b103a6da67.aspx

    Let me know if it doesn't suit your needs.
    Sayed Ibrahim Hashimi
    www.sedodream.com
    Tuesday, June 6, 2006 4:56 AM
  • a-ha, right on! Yeah, I was pretty sure somebody else would've asked that question already.  :)

    Weird thing is that I know I've run accross that blog post a few days ago, but I guess my brain wasn't functioning properly.

    Ok, now that you've pointed me to the right direction (I was going to a very wrong direction on this one...), I feel like I can go have some sleep.

    Thanks a lot!!!

    Tuesday, June 6, 2006 5:11 AM