Trigger on Build, not quality change

Oct 15, 2012 at 10:52 PM

I would like to trigger the deploy script upon successful completion of the build, with no interaction from a user.  This would allow a more direct method of deploying to our stage/test environment then triggering the deployment to the next environment with quality change.  Is this possible through some configuration of the tools?


So far I have tried to set the OrigionalQuality="*" and NewQuality="" to no avail.

Thank you,

Oct 16, 2012 at 3:03 PM

You didn't say which version of Visual Studio you're building with. That makes a big difference.

That said, my solution to this was to simply set the build state to the first deployment target upon a successful build.

In 2008, which uses MSBUILD, things are done through targets. I have a custom target that's executed post build.

<Target Name="AfterEndToEndIteration" Condition="1 == 1" DependsOnTargets="Publish">
    <SetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Quality="Development" />

In 2010, there is a SetBuildProperties task. I copied and modified the default XAML template, adding the steps to set the quality if the build was successful. I branch that template into each of my team projects, deleted the default and based builds off my custom template.

Frankly, I don't remember all the steps required for the 2008 version. I did that a long time ago. Before I spend any more time with it I'll leave it at this and see if it helps. I haven't used the newer TFS yet.

Oct 16, 2012 at 3:33 PM


Thank you very much for that response.  Soon after posting this I read some unrelated posts that got me  to thining and I eventually pursued the route you mentioned with changing the build quality qithin the build template.  We are using 2010 and adding the SetProperty works quite well.  I extended it a bit by adding an argument to the xaml,

Thank you,,