none
Why is only one trigger selectable in the trigger menu of build definition?

    Question

  • Hi,

     

    In this screenshot, and from personal experience, I cannot select more than one trigger for build automation. This means I cannot do a gated-checkin continuous integration build.

     

    Is there a way around this? Why is only one trigger selectable?

     

    Thanks

    Monday, July 12, 2010 8:59 PM

Answers

  • That is a limitation in all version of TFS Build. The only workaround is to create 2 build definitions and set different triggers on them. In the scenario you are trying to achieve, if you are using the DefaultTemplate.xaml, the "Get Activity" has NO_CI option set to True. So when the gated checkin build runs and checks in the chagne it will append ***NO_CI*** to the checkin comment that will not allow CI build to trigger. So you will need to:

    1. Create 2 build definitions with same Workspace mappings to build your projects. Set one trigger to gated and other one to CI

    2. Modify the DefaultTemplate.xaml "Get Activity" NO_CIOption to be "False"

    Hope this helps.

    Thanks,

    Madhuri

    • Marked as answer by YiChun Chen Monday, July 19, 2010 9:08 AM
    Tuesday, July 13, 2010 3:13 PM
  • Thank you for Madhuri's clarification. I can understand what GSS1's concern is.

    Hi GSS1,

    Madhuri has posted good suggestion on your concern. Please have a try.

    You can create two new build definitions. One is the original build definition. The other applied the same Project File of the original build definition. Then you can set the different triggers. They should work side by side.

    Hope this helps! Please let me know if you need any further help.

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Monday, July 19, 2010 9:09 AM
    Wednesday, July 14, 2010 8:19 AM

All replies

  • Hi GSS1,

    For your concern, I need to do some clarification with you:
    Do you mean that "Gated Check-in" feature doesn't work properly on your TFS2010?
    What do you want the trigger to be?
    Could you please send me the screen shot of your scenario so that I can understand it better?

    When I created a new Build Definition in Team Explorer 2010 and navigated to the Trigger option, I could select the following features:

    http://2efoga.bay.livefilestore.com/y1pgoXKU-xGOuOScbxBwdbKqp0MDEO8Mb-oGNxr4BuvVp-zZ4me7cmtuYv_k6PnuytIRWgvLGlBwAE2UsmTmwtGS0305p2KOt0l/TFS_Build_Trigger.PNG?psid=1

    Even I tried to create a new Build Definition in Team Explorer 2008, I could get the following screen shot:

    http://2efoga.bay.livefilestore.com/y1pICzxleYgLd-o-P0th7paTMyEXPbclM09o6aJDXSuTk8DBXnjtYOYDQDhv7Xmw3M1Ay46croZ9fYfaehgNgvHIRLKggNucU3G/TFS_Build_Trigger_2.PNG?psid=1

    Look forward to your reply. Hope this helps!

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Edited by YiChun Chen Wednesday, July 14, 2010 8:05 AM typo
    • Proposed as answer by tfs10 Tuesday, August 31, 2010 5:54 PM
    Tuesday, July 13, 2010 9:56 AM
  • That is a limitation in all version of TFS Build. The only workaround is to create 2 build definitions and set different triggers on them. In the scenario you are trying to achieve, if you are using the DefaultTemplate.xaml, the "Get Activity" has NO_CI option set to True. So when the gated checkin build runs and checks in the chagne it will append ***NO_CI*** to the checkin comment that will not allow CI build to trigger. So you will need to:

    1. Create 2 build definitions with same Workspace mappings to build your projects. Set one trigger to gated and other one to CI

    2. Modify the DefaultTemplate.xaml "Get Activity" NO_CIOption to be "False"

    Hope this helps.

    Thanks,

    Madhuri

    • Marked as answer by YiChun Chen Monday, July 19, 2010 9:08 AM
    Tuesday, July 13, 2010 3:13 PM
  • Thank you for Madhuri's clarification. I can understand what GSS1's concern is.

    Hi GSS1,

    Madhuri has posted good suggestion on your concern. Please have a try.

    You can create two new build definitions. One is the original build definition. The other applied the same Project File of the original build definition. Then you can set the different triggers. They should work side by side.

    Hope this helps! Please let me know if you need any further help.

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Monday, July 19, 2010 9:09 AM
    Wednesday, July 14, 2010 8:19 AM
  • Hi GSS1,

    I'm writing to follow up the post. Does the above suggestion work?

    Please feel free to let me know if you need any help.

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, July 15, 2010 10:36 AM
  • Hi GSS1,

    I've marked Madhuri's and my reply as answer. If you have any concern, please feel free to let me know.

    Have a nice week!

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Proposed as answer by tfs10 Tuesday, August 31, 2010 5:52 PM
    Monday, July 19, 2010 9:08 AM
  • Thanks for the reply regarding NO_CIOption in the template.

    But I cannot find the Get Activity section in DefaultTemplate.xaml, do you mean "Get the Build"? Could you also post a sample code for setting that variable to false in the default template? I am not familiar with the tags used in that file and would like change it right.

    Thank you.

    Tuesday, August 31, 2010 5:52 PM
  • Hi all,

    I've been looking in to this as well. Tfs10: the action is actually called "Get Workspace" and it appears as mtbwa:SyncWorkspace if you're viewing the xaml. Furthermore, the property isn't named "NO_CIOption" but rather "NoCIOption" instead. I'm not sure if these things were changed between beta 2 and rtm or what, but either way, that's what they are now.

    In any case, setting that parameter to false doesn't allow you to trigger CI builds after completing a gated build, as far as I can tell. I have two separate xaml files for my CI and Gated build definitions, respectively, and with NoCIOption set to false, the Gated build will complete and the CI build will still not run. Instead, the NoCIOption property simply prevents the ***NO_CI*** suffix from being appended to each of your checkin comments when completing a Gated build.

    YiChun, Madhuri, can you verify that NoCIOption actually does allow you to trigger CI builds in your environments? Thanks!

    Sunday, October 03, 2010 5:00 AM
  • Interesting. At first when I wrote the previous message, my CI builds didn't appear to be working following a gated checkin, however I just got a notification that a CI build has apparently completed. I can't explain the lag time for this effect to occur, but it appears to be working now!

    To be clear, setting the NoCIOption property on the SyncWorkflow action (either in xaml or in the designer's "Get Workspace" step) will allow CI builds to trigger after gated checkins, as well as remove the ***NO_CI*** addendum to the checkin comment. I consider this a two-fold win.

    • Proposed as answer by bwerks Monday, October 04, 2010 4:24 PM
    Monday, October 04, 2010 4:24 PM