Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manually Trigger a TFS Team Build

How would you manually trigger additional team builds from a team build? For example, when we were in CC.Net other builds would trigger if certain builds were successful. The second build could either be projects that use this component or additional, long running test libraries for the same component.

like image 707
Mark Avatar asked Oct 10 '08 13:10

Mark


1 Answers

One way you could do it is you could an an AfterEndToEndIteration target to your TFSBuild.proj file that would runs the TfsBuild.exe command line to start you other builds. I'm thinking something like this (though I haven't tested it)

  <Target Name="AfterEndToEndIteration">

    <GetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
                        BuildUri="$(BuildUri)"
                        Condition=" '$(IsDesktopBuild)' != 'true' ">
      <Output TaskParameter="Status" PropertyName="Status" />
    </GetBuildProperties>

    <Exec Condition=" '$(Status)'=='Succeeded' "
          Command="TfsBuild.exe start /server:$(TeamFoundationServerUrl) /buildDefinition:&quot;Your Build Definition To Run&quot;" />

  </Target>
like image 186
Martin Woodward Avatar answered Sep 21 '22 07:09

Martin Woodward