Created
January 4, 2012 11:19
-
-
Save ianbattersby/1559622 to your computer and use it in GitHub Desktop.
TFS 2010 Build workflow incorporating NUnit runner and publishing back into TFS via NUnitTfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Activity mc:Ignorable="sap" x:Class="TfsBuild.Process" this:Process.BuildSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()]" this:Process.TestSpecs="[New Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList(New Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec("**\*test*.dll"))]" this:Process.BuildNumberFormat="["$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)"]" this:Process.CleanWorkspace="[Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]" this:Process.RunCodeAnalysis="[Microsoft.TeamFoundation.Build.Workflow.Activities.CodeAnalysisOption.AsConfigured]" this:Process.SourceAndSymbolServerSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.SourceAndSymbolServerSettings(True, Nothing)]" this:Process.AgentSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]" this:Process.AssociateChangesetsAndWorkItems="[True]" this:Process.CreateWorkItem="[True]" this:Process.DropBuild="[True]" this:Process.MSBuildPlatform="[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]" this:Process.PerformTestImpactAnalysis="[True]" this:Process.CreateLabel="[True]" this:Process.DisableTests="[False]" this:Process.Verbosity="[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]" this:Process.SupportedReasons="All" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbw1="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa1="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" xmlns:mtvc1="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mtvc2="clr-namespace:Microsoft.TeamFoundation.VersionControl.Common;assembly=Microsoft.TeamFoundation.VersionControl.Common" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System.Core" xmlns:s2="clr-namespace:System;assembly=System" xmlns:s3="clr-namespace:System;assembly=System.ServiceModel" xmlns:s4="clr-namespace:System;assembly=System.ComponentModel.Composition" xmlns:s5="clr-namespace:System;assembly=Microsoft.VisualStudio.Platform.VSEditor" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:this="clr-namespace:TfsBuild" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<x:Members> | |
<x:Property Name="BuildSettings" Type="InArgument(mtbwa:BuildSettings)" /> | |
<x:Property Name="TestSpecs" Type="InArgument(mtbwa:TestSpecList)" /> | |
<x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" /> | |
<x:Property Name="CleanWorkspace" Type="InArgument(mtbwa:CleanWorkspaceOption)" /> | |
<x:Property Name="RunCodeAnalysis" Type="InArgument(mtbwa:CodeAnalysisOption)" /> | |
<x:Property Name="SourceAndSymbolServerSettings" Type="InArgument(mtbwa:SourceAndSymbolServerSettings)" /> | |
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" /> | |
<x:Property Name="AssociateChangesetsAndWorkItems" Type="InArgument(x:Boolean)" /> | |
<x:Property Name="CreateWorkItem" Type="InArgument(x:Boolean)" /> | |
<x:Property Name="DropBuild" Type="InArgument(x:Boolean)" /> | |
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" /> | |
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" /> | |
<x:Property Name="PerformTestImpactAnalysis" Type="InArgument(x:Boolean)" /> | |
<x:Property Name="CreateLabel" Type="InArgument(x:Boolean)" /> | |
<x:Property Name="DisableTests" Type="InArgument(x:Boolean)" /> | |
<x:Property Name="GetVersion" Type="InArgument(x:String)" /> | |
<x:Property Name="PrivateDropLocation" Type="InArgument(x:String)" /> | |
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" /> | |
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" /> | |
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" /> | |
<x:Property Name="TFSPublish" Type="InArgument(x:String)" /> | |
<x:Property Name="NUnitBin" Type="InArgument(x:String)" /> | |
</x:Members> | |
<this:Process.MSBuildArguments> | |
<InArgument x:TypeArguments="x:String" /> | |
</this:Process.MSBuildArguments> | |
<this:Process.GetVersion> | |
<InArgument x:TypeArguments="x:String" /> | |
</this:Process.GetVersion> | |
<this:Process.Metadata> | |
<mtbw:ProcessParameterMetadataCollection /> | |
</this:Process.Metadata> | |
<sap:VirtualizedContainerService.HintSize>1233,4144</sap:VirtualizedContainerService.HintSize> | |
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="ShouldCollapseAll">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<Sequence sad:XamlDebuggerXmlReader.FileName="c:\source\adastra\athena\BuildProcessTemplates\NUnitAndPublishTemplate.xaml" sap:VirtualizedContainerService.HintSize="1193,4104" mtbwt:BuildTrackingParticipant.Importance="None" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:GetBuildDetail DisplayName="Get the Build" sap:VirtualizedContainerService.HintSize="1171,22" mtbwt:BuildTrackingParticipant.Importance="Low" Result="[BuildDetail]" /> | |
<Sequence DisplayName="Update Drop Location" sap:VirtualizedContainerService.HintSize="1171,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" sap:VirtualizedContainerService.HintSize="611,146" Reason="Triggered"> | |
<mtbwa:UpdateBuildNumber BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update Build Number" sap:VirtualizedContainerService.HintSize="200,22" /> | |
</mtbwa:InvokeForReason> | |
<If Condition="[DropBuild AndAlso (BuildDetail.Reason And Microsoft.TeamFoundation.Build.Client.BuildReason.Triggered) = BuildDetail.Reason]" DisplayName="If DropBuild And Build Reason is Triggered" sap:VirtualizedContainerService.HintSize="611,560" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<Sequence sap:VirtualizedContainerService.HintSize="486,454" mtbwt:BuildTrackingParticipant.Importance="None"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<If Condition="[String.IsNullOrEmpty(BuildDetail.DropLocationRoot)]" DisplayName="If DropLocationRoot is empty" sap:VirtualizedContainerService.HintSize="464,206" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<Throw DisplayName="Throw EmptyDropLocationRootException" Exception="[New Microsoft.TeamFoundation.Build.Workflow.Activities.EmptyDropLocationRootException(BuildDetail.BuildDefinition.Name)]" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Low" /> | |
</If.Then> | |
</If> | |
<mtbwa:SetBuildProperties DisplayName="Set Drop Location" DropLocation="[BuildDetail.DropLocationRoot + "\" + BuildDetail.BuildDefinition.Name + "\" + BuildDetail.BuildNumber]" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" PropertiesToSet="DropLocation" /> | |
<mtbwa:CreateDirectory Directory="[BuildDetail.DropLocation]" DisplayName="Create the Drop Location" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Normal" /> | |
</Sequence> | |
</If.Then> | |
</If> | |
<If Condition="[DropBuild AndAlso BuildDetail.Reason = Microsoft.TeamFoundation.Build.Client.BuildReason.ValidateShelveset]" DisplayName="If DropBuild And Build Reason is ValidateShelveset" sap:VirtualizedContainerService.HintSize="611,420" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<If Condition="[Not String.IsNullOrEmpty(PrivateDropLocation)]" sap:VirtualizedContainerService.HintSize="464,314" mtbwt:BuildTrackingParticipant.Importance="None"> | |
<If.Then> | |
<Sequence sap:VirtualizedContainerService.HintSize="231,208" mtbwt:BuildTrackingParticipant.Importance="None"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:SetBuildProperties DisplayName="Set Drop Location for Private Build" DropLocation="[PrivateDropLocation + "\" + BuildDetail.BuildDefinition.Name + "\" + BuildDetail.BuildNumber]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" PropertiesToSet="DropLocation" /> | |
<mtbwa:CreateDirectory Directory="[BuildDetail.DropLocation]" DisplayName="Create the Drop Location" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Normal" /> | |
</Sequence> | |
</If.Then> | |
<If.Else> | |
<mtbwa:WriteBuildWarning sap:VirtualizedContainerService.HintSize="208,208" Message="The build outputs for this private build will not be copied to the drop location because the PrivateDropLocation is not set." /> | |
</If.Else> | |
</If> | |
</If.Then> | |
</If> | |
</Sequence> | |
<mtbwa:AgentScope DisplayName="Run On Agent" sap:VirtualizedContainerService.HintSize="1171,3736" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"> | |
<mtbwa:AgentScope.Variables> | |
<Variable x:TypeArguments="mtbc:IBuildAgent" Name="BuildAgent" /> | |
<Variable x:TypeArguments="mtvc1:Workspace" Name="Workspace" /> | |
<Variable x:TypeArguments="x:String" Name="BuildDirectory" /> | |
<Variable x:TypeArguments="x:String" Default="[BuildDetail.BuildNumber]" Name="LabelName" /> | |
<Variable x:TypeArguments="x:String" Name="WorkspaceName" /> | |
<Variable x:TypeArguments="x:String" Name="SourcesDirectory" /> | |
<Variable x:TypeArguments="x:String" Name="BinariesDirectory" /> | |
<Variable x:TypeArguments="x:String" Name="TestResultsDirectory" /> | |
</mtbwa:AgentScope.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<Sequence DisplayName="Initialize Variables" sap:VirtualizedContainerService.HintSize="1149,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">False</x:Boolean> | |
<x:Boolean x:Key="IsPinned">False</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:GetBuildAgent DisplayName="Get the Agent" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" Result="[BuildAgent]" /> | |
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" Result="[BuildDirectory]" /> | |
<Assign x:TypeArguments="x:String" DisplayName="Initialize Workspace Name" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[WorkspaceName]" Value="[String.Format("{0}_{1}_{2}", BuildDetail.BuildDefinition.Id, Microsoft.TeamFoundation.LinkingUtilities.DecodeUri(BuildAgent.Uri.AbsoluteUri).ToolSpecificId, BuildAgent.ServiceHost.Name)]" /> | |
<Assign x:TypeArguments="x:String" DisplayName="Initialize Sources Directory" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[SourcesDirectory]" Value="[String.Format("{0}\Sources", BuildDirectory)]" /> | |
<Assign x:TypeArguments="x:String" DisplayName="Initialize Binaries Directory" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[BinariesDirectory]" Value="[String.Format("{0}\Binaries", BuildDirectory)]" /> | |
<Assign x:TypeArguments="x:String" DisplayName="Initialize TestResults Directory" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[TestResultsDirectory]" Value="[String.Format("{0}\TestResults", BuildDirectory)]" /> | |
<If Condition="[Not BuildSettings.HasPlatformConfigurations]" DisplayName="If Not BuildSettings.HasPlatformConfigurations" sap:VirtualizedContainerService.HintSize="464,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<AddToCollection x:TypeArguments="mtbwa:PlatformConfiguration" Collection="[BuildSettings.PlatformConfigurations]" DisplayName="Use Default Platform Configuration" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Low" Item="[Microsoft.TeamFoundation.Build.Workflow.Activities.PlatformConfiguration.Default]" /> | |
</If.Then> | |
</If> | |
<If Condition="[WorkspaceName.Length > Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize]" DisplayName="If WorkspaceName > MaxSize" sap:VirtualizedContainerService.HintSize="464,314" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<Sequence sap:VirtualizedContainerService.HintSize="281,208" mtbwt:BuildTrackingParticipant.Importance="None"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:WriteBuildWarning sap:VirtualizedContainerService.HintSize="200,22" Message="[String.Format("The workspace name '{0}' exceeds the maximum allowed limit of '{1}' characters. Truncating it to match the maximum limit.", WorkspaceName, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize)]" /> | |
<Assign x:TypeArguments="x:String" DisplayName="Truncate WorkspaceName to MaxSize" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[WorkspaceName]" Value="[WorkspaceName.Substring(0, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize).TrimEnd()]" /> | |
</Sequence> | |
</If.Then> | |
</If> | |
</Sequence> | |
<Sequence DisplayName="Initialize Workspace" sap:VirtualizedContainerService.HintSize="1149,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:DeleteDirectory Directory="[TestResultsDirectory]" DisplayName="Delete Test Results Directory" sap:VirtualizedContainerService.HintSize="818,22" mtbwt:BuildTrackingParticipant.Importance="Normal" Recursive="[True]" /> | |
<If Condition="[Not CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.None]" DisplayName="If Not CleanWorkspace = CleanWorkspaceOption.None" sap:VirtualizedContainerService.HintSize="818,206" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:DeleteDirectory Directory="[BinariesDirectory]" DisplayName="Delete Binaries Directory" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Normal" /> | |
</If.Then> | |
</If> | |
<If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.All" sap:VirtualizedContainerService.HintSize="818,314" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<Sequence DisplayName="Delete Workspace and Sources Directory" sap:VirtualizedContainerService.HintSize="281,208" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:DeleteWorkspace DeleteLocalItems="[True]" DisplayName="Delete Workspace" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Normal" Name="[WorkspaceName]" /> | |
<mtbwa:DeleteDirectory Directory="[SourcesDirectory]" DisplayName="Delete Sources Directory" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Normal" /> | |
</Sequence> | |
</If.Then> | |
</If> | |
<mtbwa:CreateWorkspace BuildDirectory="[BuildDirectory]" Comment="["Workspace Created by Team Build"]" DisplayName="Create Workspace" sap:VirtualizedContainerService.HintSize="818,22" Name="[WorkspaceName]" Result="[Workspace]" SourcesDirectory="[SourcesDirectory]" /> | |
<If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.Outputs]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.Outputs" sap:VirtualizedContainerService.HintSize="818,940" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<ForEach x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="For Each Configuration in BuildSettings.PlatformConfigurations" sap:VirtualizedContainerService.HintSize="693,834" mtbwt:BuildTrackingParticipant.Importance="Low" Values="[BuildSettings.PlatformConfigurations]"> | |
<ActivityAction x:TypeArguments="mtbwa:PlatformConfiguration"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="mtbwa:PlatformConfiguration" Name="platformConfiguration" /> | |
</ActivityAction.Argument> | |
<Sequence DisplayName="Clean Configuration" sap:VirtualizedContainerService.HintSize="663,728"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<If Condition="[BuildSettings.HasProjectsToBuild]" DisplayName="If BuildSettings.HasProjectsToBuild" sap:VirtualizedContainerService.HintSize="641,604" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<ForEach x:TypeArguments="x:String" DisplayName="For Each Project in BuildSettings.ProjectsToBuild" sap:VirtualizedContainerService.HintSize="516,498" mtbwt:BuildTrackingParticipant.Importance="Low" Values="[BuildSettings.ProjectsToBuild]"> | |
<ActivityAction x:TypeArguments="x:String"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="x:String" Name="serverBuildProjectItem" /> | |
</ActivityAction.Argument> | |
<Sequence DisplayName="Clean Project" sap:VirtualizedContainerService.HintSize="486,392" mtbwt:BuildTrackingParticipant.Importance="Normal"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="x:String" Name="localBuildProjectItem" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Paths to Local Paths" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" Input="[serverBuildProjectItem]" Result="[localBuildProjectItem]" Workspace="[Workspace]" /> | |
<If Condition="[System.IO.File.Exists(localBuildProjectItem)]" DisplayName="If File.Exists(Project)" sap:VirtualizedContainerService.HintSize="464,206" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:MSBuild CommandLineArguments="[String.Format("/p:SkipInvalidConfigurations=true {0}", MSBuildArguments)]" Configuration="[platformConfiguration.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" sap:VirtualizedContainerService.HintSize="269,100" OutDir="[BinariesDirectory]" Platform="[platformConfiguration.Platform]" Project="[localBuildProjectItem]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" Targets="[New String() { "Clean" }]" TargetsNotLogged="[New String() {"GetNativeManifest", "GetCopyToOutputDirectoryItems", "GetTargetPath"}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" /> | |
</If.Then> | |
</If> | |
</Sequence> | |
</ActivityAction> | |
</ForEach> | |
</If.Then> | |
</If> | |
</Sequence> | |
</ActivityAction> | |
</ForEach> | |
</If.Then> | |
</If> | |
<mtbwa:SyncWorkspace DisplayName="Get Workspace" sap:VirtualizedContainerService.HintSize="818,22" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" VersionOverride="[GetVersion]" Workspace="[Workspace]" /> | |
</Sequence> | |
<If Condition="[CreateLabel]" DisplayName="If CreateLabel" sap:VirtualizedContainerService.HintSize="1149,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:InvokeForReason DisplayName="Create and Set Label for non-Shelveset Builds" sap:VirtualizedContainerService.HintSize="281,208" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated"> | |
<mtbwa:LabelWorkspace Comment="["Label Created by Team Build"]" DisplayName="Create Label" sap:VirtualizedContainerService.HintSize="200,22" Name="[LabelName]" Scope="[String.Format("$/{0}", BuildDetail.BuildDefinition.TeamProject)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" Workspace="[Workspace]" /> | |
<mtbwa:SetBuildProperties DisplayName="Set Label on BuildDetail" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" LabelName="[String.Format("{0}@$/{1}", LabelName, BuildDetail.BuildDefinition.TeamProject)]" PropertiesToSet="LabelName" /> | |
</mtbwa:InvokeForReason> | |
</If.Then> | |
</If> | |
<TryCatch DisplayName="Try Compile, Test, and Associate Changesets and Work Items" sap:VirtualizedContainerService.HintSize="1149,3339" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<TryCatch.Finally> | |
<Sequence DisplayName="Revert Workspace and Copy Files to Drop Location" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<mtbwa:InvokeForReason DisplayName="Revert Workspace for Shelveset Builds" Reason="ValidateShelveset, CheckInShelveset"> | |
<mtbwa:RevertWorkspace DisplayName="Revert Workspace" Workspace="[Workspace]" /> | |
</mtbwa:InvokeForReason> | |
<If Condition="[DropBuild AndAlso Not String.IsNullOrEmpty(BuildDetail.DropLocation)]" DisplayName="If DropBuild And DropLocation is Set" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:CopyDirectory Destination="[BuildDetail.DropLocation]" DisplayName="Copy Files to Drop Location" Source="[BinariesDirectory]" /> | |
</If.Then> | |
</If> | |
</Sequence> | |
</TryCatch.Finally> | |
<TryCatch.Try> | |
<Sequence sap:VirtualizedContainerService.HintSize="1131,3174" mtbwt:BuildTrackingParticipant.Importance="None"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="s:Exception" Name="compilationException" /> | |
<Variable x:TypeArguments="scg:IList(mtvc1:Changeset)" Name="associatedChangesets" /> | |
<Variable x:TypeArguments="x:Boolean" Name="treatTestFailureAsBuildFailure" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<Parallel DisplayName="Compile, Test, and Associate Changesets and Work Items" sap:VirtualizedContainerService.HintSize="1109,2868"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<TryCatch DisplayName="Try Compile and Test" sap:VirtualizedContainerService.HintSize="755,2822" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<TryCatch.Try> | |
<Sequence DisplayName="Compile and Test" sap:VirtualizedContainerService.HintSize="737,2635"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ForEach x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="For Each Configuration in BuildSettings.PlatformConfigurations" sap:VirtualizedContainerService.HintSize="715,2238" mtbwt:BuildTrackingParticipant.Importance="Low" Values="[BuildSettings.PlatformConfigurations]"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ActivityAction x:TypeArguments="mtbwa:PlatformConfiguration"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="mtbwa:PlatformConfiguration" Name="platformConfiguration" /> | |
</ActivityAction.Argument> | |
<Sequence DisplayName="Compile and Test for Configuration" sap:VirtualizedContainerService.HintSize="685,2132" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="x:String" Name="outputDirectory" /> | |
<Variable x:TypeArguments="x:String" Name="logFileDropLocation" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<Sequence DisplayName="Initialize Variables" sap:VirtualizedContainerService.HintSize="663,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<Assign x:TypeArguments="x:String" DisplayName="Initialize OutputDirectory" sap:VirtualizedContainerService.HintSize="464,22" mtbwt:BuildTrackingParticipant.Importance="Low" To="[outputDirectory]" Value="[If (platformConfiguration.IsEmpty Or BuildSettings.PlatformConfigurations.Count = 1, BinariesDirectory, If (platformConfiguration.IsPlatformEmptyOrAnyCpu, BinariesDirectory + "\" + platformConfiguration.Configuration, BinariesDirectory + "\" + platformConfiguration.Platform + "\" + platformConfiguration.Configuration))]" /> | |
<If Condition="[Not String.IsNullOrEmpty(BuildDetail.DropLocation)]" DisplayName="If DropLocation is Set" sap:VirtualizedContainerService.HintSize="464,206" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<Assign x:TypeArguments="x:String" DisplayName="Initialize LogFile Drop Location" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Low" To="[logFileDropLocation]" Value="[If (platformConfiguration.IsEmpty Or BuildSettings.PlatformConfigurations.Count = 1, BuildDetail.DropLocation + "\logs", If (platformConfiguration.IsPlatformEmptyOrAnyCpu, BuildDetail.DropLocation + "\logs\" + platformConfiguration.Configuration, BuildDetail.DropLocation + "\logs\" + platformConfiguration.Platform + "\" + platformConfiguration.Configuration))]" /> | |
</If.Then> | |
</If> | |
</Sequence> | |
<If Condition="[BuildSettings.HasProjectsToBuild]" DisplayName="If BuildSettings.HasProjectsToBuild" sap:VirtualizedContainerService.HintSize="663,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<ForEach x:TypeArguments="x:String" DisplayName="For Each Project in BuildSettings.ProjectsToBuild" sap:VirtualizedContainerService.HintSize="313,206" mtbwt:BuildTrackingParticipant.Importance="Low" Values="[BuildSettings.ProjectsToBuild]"> | |
<ActivityAction x:TypeArguments="x:String"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="x:String" Name="serverBuildProjectItem" /> | |
</ActivityAction.Argument> | |
<TryCatch DisplayName="Try to Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<TryCatch.Try> | |
<Sequence DisplayName="Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="x:String" Name="localProject" /> | |
</Sequence.Variables> | |
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" mtbwt:BuildTrackingParticipant.Importance="Low" Input="[serverBuildProjectItem]" Result="[localProject]" Workspace="[Workspace]" /> | |
<mtbwa:MSBuild CommandLineArguments="[String.Format("/p:SkipInvalidConfigurations=true {0}", MSBuildArguments)]" Configuration="[platformConfiguration.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" LogFileDropLocation="[logFileDropLocation]" OutDir="[outputDirectory]" Platform="[platformConfiguration.Platform]" Project="[localProject]" RunCodeAnalysis="[RunCodeAnalysis]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" TargetsNotLogged="[New String() {"GetNativeManifest", "GetCopyToOutputDirectoryItems", "GetTargetPath"}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" /> | |
</Sequence> | |
</TryCatch.Try> | |
<TryCatch.Catches> | |
<Catch x:TypeArguments="s:Exception"> | |
<ActivityAction x:TypeArguments="s:Exception"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="s:Exception" Name="ex" /> | |
</ActivityAction.Argument> | |
<Sequence DisplayName="Handle Exception"> | |
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]" DisplayName="Set CompilationStatus to Failed" mtbwt:BuildTrackingParticipant.Importance="Low" PropertiesToSet="CompilationStatus" /> | |
<If Condition="[CreateWorkItem]" DisplayName="If CreateWorkItem" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:InvokeForReason DisplayName="Create Work Item for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated"> | |
<mtbwa:OpenWorkItem AssignedTo="[BuildDetail.RequestedFor]" Comment="["This work item was created by TFS Build on a build failure."]" CustomFields="[New Dictionary(Of String, String) From { {"System.AreaPath", "Adastra.System\Technical Debt"}, {"System.State", "New"}, {"ADHC.Backlog.ReferenceID", BuildDetail.BuildNumber}, {"System.Reason", "Build Failure"}, {"Microsoft.VSTS.TCM.ReproSteps", "Start the build using TFS Build"}, {"Microsoft.VSTS.CMMI.Symptom", "Build Failure"}, {"Priority", "1"}, {"Severity", "4 - Critical"} }]" DisplayName="Create Work Item" Title="[String.Format("Build Failure in Build: {0}", BuildDetail.BuildNumber)]" Type="["Bug"]" /> | |
</mtbwa:InvokeForReason> | |
</If.Then> | |
</If> | |
<Rethrow DisplayName="Rethrow the exception so the build will stop" mtbwt:BuildTrackingParticipant.Importance="Low" /> | |
</Sequence> | |
</ActivityAction> | |
</Catch> | |
</TryCatch.Catches> | |
</TryCatch> | |
</ActivityAction> | |
</ForEach> | |
</If.Then> | |
</If> | |
<If Condition="[Not DisableTests]" DisplayName="If Not DisableTests" sap:VirtualizedContainerService.HintSize="663,1826"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<If.Then> | |
<Sequence DisplayName="Run Tests" sap:VirtualizedContainerService.HintSize="538,1720"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="testAssemblies" /> | |
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="testResults" /> | |
<Variable x:TypeArguments="mtbwa:TestAssemblySpec" Name="testAssembly" /> | |
<Variable x:TypeArguments="mtbwa:TestAssemblySpec" Name="testAssemblySpec" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ForEach x:TypeArguments="mtbwa:TestSpec" DisplayName="ForEach<TestSpec>" sap:VirtualizedContainerService.HintSize="516,1596" Values="[TestSpecs]"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ActivityAction x:TypeArguments="mtbwa:TestSpec"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="mtbwa:TestSpec" Name="testSpec" /> | |
</ActivityAction.Argument> | |
<Sequence sap:VirtualizedContainerService.HintSize="486,1490"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="x:String" Name="testAssemblyMatchPattern" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:WriteBuildMessage DisplayName="Write outputDirectory" sap:VirtualizedContainerService.HintSize="464,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="["outputDirectory is: " + outputDirectory]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" /> | |
<Cast x:TypeArguments="mtbwa:TestSpec, mtbwa:TestAssemblySpec" sap:VirtualizedContainerService.HintSize="464,22" Operand="[testSpec]" Result="[testAssemblySpec]" /> | |
<mtbwa:WriteBuildMessage DisplayName="Write testAssemblySpec.AssemblyFileSpec" sap:VirtualizedContainerService.HintSize="464,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="["testAssemblySpec.AssemblyFileSpec is: " + testAssemblySpec.AssemblyFileSpec]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" /> | |
<Assign sap:VirtualizedContainerService.HintSize="464,58"> | |
<Assign.To> | |
<OutArgument x:TypeArguments="x:String">[testAssemblyMatchPattern]</OutArgument> | |
</Assign.To> | |
<Assign.Value> | |
<InArgument x:TypeArguments="x:String">[String.Format("{0}\{1}", outputDirectory, testAssemblySpec.AssemblyFileSpec)]</InArgument> | |
</Assign.Value> | |
</Assign> | |
<mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="464,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="["testAssemblyMatchPattern: " + testAssemblyMatchPattern]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" /> | |
<mtbwa:FindMatchingFiles DisplayName="Find Test Assemblies --> testAssemblies" sap:VirtualizedContainerService.HintSize="464,22" MatchPattern="[testAssemblyMatchPattern]" Result="[testAssemblies]" /> | |
<Assign sap:VirtualizedContainerService.HintSize="464,58"> | |
<Assign.To> | |
<OutArgument x:TypeArguments="x:Boolean">[treatTestFailureAsBuildFailure]</OutArgument> | |
</Assign.To> | |
<Assign.Value> | |
<InArgument x:TypeArguments="x:Boolean">[testSpec.FailBuildOnFailure]</InArgument> | |
</Assign.Value> | |
</Assign> | |
<If Condition="[testAssemblies.Count() > 0]" DisplayName="If Test Assemblies Found" sap:VirtualizedContainerService.HintSize="464,860"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<If.Then> | |
<Sequence DisplayName="Run NUnit" sap:VirtualizedContainerService.HintSize="327,754"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ForEach x:TypeArguments="x:String" DisplayName="Loop through all Test Assemblies" sap:VirtualizedContainerService.HintSize="294,630" Values="[testAssemblies]"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ActivityAction x:TypeArguments="x:String"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="x:String" Name="item" /> | |
</ActivityAction.Argument> | |
<Sequence sap:VirtualizedContainerService.HintSize="264,524"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="x:String" Name="assemblyName" /> | |
<Variable x:TypeArguments="x:String" Name="testResultXmlPath" /> | |
<Variable x:TypeArguments="x:String" Name="variable1" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<Assign DisplayName="Get Assembly Name" sap:VirtualizedContainerService.HintSize="242,58"> | |
<Assign.To> | |
<OutArgument x:TypeArguments="x:String">[assemblyName]</OutArgument> | |
</Assign.To> | |
<Assign.Value> | |
<InArgument x:TypeArguments="x:String">[item.Substring(item.LastIndexOf("\") + 1)]</InArgument> | |
</Assign.Value> | |
</Assign> | |
<Assign DisplayName="Get Test Result Path" sap:VirtualizedContainerService.HintSize="242,58"> | |
<Assign.To> | |
<OutArgument x:TypeArguments="x:String">[testResultXmlPath]</OutArgument> | |
</Assign.To> | |
<Assign.Value> | |
<InArgument x:TypeArguments="x:String">[String.Format("{0}\{1}.ResultXml.xml", logFileDropLocation, assemblyName)]</InArgument> | |
</Assign.Value> | |
</Assign> | |
<mtbwa:WriteBuildMessage DisplayName="Write testResultXmlPath" sap:VirtualizedContainerService.HintSize="242,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="["testResultXmlPath: " + testResultXmlPath]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" /> | |
<mtbwa:InvokeProcess Arguments="[String.Format("""{0}"" /xml:""{1}"" /nologo /nodots", item, testResultXmlPath)]" DisplayName="Execute NUnit" FileName="[NUnitBin]" sap:VirtualizedContainerService.HintSize="242,51"> | |
<mtbwa:InvokeProcess.ErrorDataReceived> | |
<ActivityAction x:TypeArguments="x:String"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="x:String" Name="errOutput" /> | |
</ActivityAction.Argument> | |
<mtbwa:WriteBuildError sap:VirtualizedContainerService.HintSize="633,22" Message="[errOutput]" /> | |
</ActivityAction> | |
</mtbwa:InvokeProcess.ErrorDataReceived> | |
<mtbwa:InvokeProcess.OutputDataReceived> | |
<ActivityAction x:TypeArguments="x:String"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" /> | |
</ActivityAction.Argument> | |
<Sequence sap:VirtualizedContainerService.HintSize="633,724"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
<x:Boolean x:Key="IsPinned">False</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="611,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[	 stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" /> | |
<If Condition="[(Not stdOutput.Contains("Failures: 0") And stdOutput.Contains("Failures:")) Or
(Not stdOutput.Contains("Errors: 0") And stdOutput.Contains("Errors:"))]" DisplayName="If there were failed tests" sap:VirtualizedContainerService.HintSize="611,538"> | |
<If.Then> | |
<Sequence sap:VirtualizedContainerService.HintSize="486,428"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<Assign sap:VirtualizedContainerService.HintSize="464,58"> | |
<Assign.To> | |
<OutArgument x:TypeArguments="mtbc:BuildPhaseStatus">[BuildDetail.TestStatus]</OutArgument> | |
</Assign.To> | |
<Assign.Value> | |
<InArgument x:TypeArguments="mtbc:BuildPhaseStatus">[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]</InArgument> | |
</Assign.Value> | |
</Assign> | |
<If Condition="[treatTestFailureAsBuildFailure]" sap:VirtualizedContainerService.HintSize="464,206"> | |
<If.Then> | |
<mtbwa:WriteBuildError sap:VirtualizedContainerService.HintSize="219,100" Message="[assemblyName & " -> " & stdOutput]" /> | |
</If.Then> | |
<If.Else> | |
<mtbwa:WriteBuildWarning sap:VirtualizedContainerService.HintSize="220,100" Message="[assemblyName & " -> " & stdOutput]" /> | |
</If.Else> | |
</If> | |
</Sequence> | |
</If.Then> | |
</If> | |
</Sequence> | |
</ActivityAction> | |
</mtbwa:InvokeProcess.OutputDataReceived> | |
</mtbwa:InvokeProcess> | |
<mtbwa:FindMatchingFiles DisplayName="Find Test Assemblies --> testAssemblies" sap:VirtualizedContainerService.HintSize="464,22" MatchPattern="[testResultXmlPath]" Result="[testResults]" /> | |
<If Condition="[testResults.Count() > 0]" DisplayName="If Test Results Found"> | |
<If.Then> | |
<Sequence> | |
<mtbwa:InvokeProcess Arguments="[String.Format("-n {0} -t {1} -p ""{2}"" -f {3} -b ""{4}"" -v 2010", testResultXmlPath, BuildDetail.TeamProject, BuildSettings.PlatformConfigurations(0).Platform, BuildSettings.PlatformConfigurations(0).Configuration, BuildDetail.BuildNumber)]" DisplayName="Publish NUnit results" FileName="[TFSPublish]" sap:VirtualizedContainerService.HintSize="234,198" WorkingDirectory="[outputDirectory]"> | |
<mtbwa:InvokeProcess.ErrorDataReceived> | |
<ActivityAction x:TypeArguments="x:String"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="x:String" Name="errOutput" /> | |
</ActivityAction.Argument> | |
<mtbwa:WriteBuildError DisplayName="Write NUnit Publish Failure" sap:VirtualizedContainerService.HintSize="200,22" Message="[errOutput]" /> | |
</ActivityAction> | |
</mtbwa:InvokeProcess.ErrorDataReceived> | |
<mtbwa:InvokeProcess.OutputDataReceived> | |
<ActivityAction x:TypeArguments="x:String"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" /> | |
</ActivityAction.Argument> | |
<mtbwa:WriteBuildMessage DisplayName="Write NUnit results publish output" sap:VirtualizedContainerService.HintSize="200,22" Message="[stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" /> | |
</ActivityAction> | |
</mtbwa:InvokeProcess.OutputDataReceived> | |
</mtbwa:InvokeProcess> | |
</Sequence> | |
</If.Then> | |
</If> | |
</Sequence> | |
</ActivityAction> | |
</ForEach> | |
</Sequence> | |
</If.Then> | |
</If> | |
</Sequence> | |
</ActivityAction> | |
</ForEach> | |
</Sequence> | |
</If.Then> | |
</If> | |
</Sequence> | |
</ActivityAction> | |
</ForEach> | |
<If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown" sap:VirtualizedContainerService.HintSize="715,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Low" PropertiesToSet="CompilationStatus" /> | |
</If.Then> | |
</If> | |
<If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown" sap:VirtualizedContainerService.HintSize="715,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Low" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" /> | |
</If.Then> | |
</If> | |
<If Condition="[treatTestFailureAsBuildFailure And (BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed)]" DisplayName="If TreatTestFailureAsBuildFailure And (TestStatus = Failed)" sap:VirtualizedContainerService.HintSize="715,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:SetBuildProperties DisplayName="Set Status to Failed" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Low" PropertiesToSet="Status" Status="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed]" /> | |
</If.Then> | |
</If> | |
</Sequence> | |
</TryCatch.Try> | |
<TryCatch.Catches> | |
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="741,21"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">False</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ActivityAction x:TypeArguments="s:Exception"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="s:Exception" Name="compilationExceptionArgument" /> | |
</ActivityAction.Argument> | |
<Assign x:TypeArguments="s:Exception" DisplayName="Save the Compilation Exception" sap:VirtualizedContainerService.HintSize="735,75" mtbwt:BuildTrackingParticipant.Importance="None" To="[compilationException]" Value="[compilationExceptionArgument]" /> | |
</ActivityAction> | |
</Catch> | |
</TryCatch.Catches> | |
</TryCatch> | |
<If Condition="[AssociateChangesetsAndWorkItems]" DisplayName="If AssociateChangesetsAndWorkItems" sap:VirtualizedContainerService.HintSize="200,2822" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:InvokeForReason DisplayName="Associate Changesets and Work Items for non-Shelveset Builds" sap:VirtualizedContainerService.HintSize="281,146" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated"> | |
<mtbwa:AssociateChangesetsAndWorkItems DisplayName="Associate Changesets and Work Items" sap:VirtualizedContainerService.HintSize="200,22" Result="[associatedChangesets]" /> | |
</mtbwa:InvokeForReason> | |
</If.Then> | |
</If> | |
</Parallel> | |
<If Condition="[Not compilationException Is Nothing]" DisplayName="If a Compilation Exception Occurred" sap:VirtualizedContainerService.HintSize="1109,51" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<Throw DisplayName="Rethrow Compilation Exception" Exception="[compilationException]" sap:VirtualizedContainerService.HintSize="269,100" mtbwt:BuildTrackingParticipant.Importance="Low" /> | |
</If.Then> | |
</If> | |
<Parallel DisplayName="Get Impacted Tests, Index Sources and Publish Symbols" sap:VirtualizedContainerService.HintSize="1109,51"> | |
<If Condition="[PerformTestImpactAnalysis]" DisplayName="If PerformTestImpactAnalysis" sap:VirtualizedContainerService.HintSize="464,1164" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<Sequence DisplayName="Get Impacted Tests" sap:VirtualizedContainerService.HintSize="281,208" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<Sequence.Variables> | |
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="assemblies" /> | |
</Sequence.Variables> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">True</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<mtbwa:FindMatchingFiles DisplayName="Find Build Outputs" sap:VirtualizedContainerService.HintSize="200,22" mtbwt:BuildTrackingParticipant.Importance="Low" MatchPattern="[String.Format("{0}\**\*.dll;{0}\**\*.exe", BinariesDirectory)]" Result="[assemblies]" /> | |
<mttbb:GetImpactedTests BaselineBuildDropLocation="{x:Null}" CodeChanges="{x:Null}" ImpactedTests="{x:Null}" Assemblies="[assemblies]" AssociatedChangesets="[associatedChangesets]" BinariesRoot="[BinariesDirectory]" Build="[BuildDetail]" DisplayName="Get Impacted Tests" sap:VirtualizedContainerService.HintSize="200,22" Workspace="[Workspace]" /> | |
</Sequence> | |
</If.Then> | |
</If> | |
<If Condition="[SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath" sap:VirtualizedContainerService.HintSize="690,1164" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<mtbwa:InvokeForReason DisplayName="Index Sources and Publish Symbols for Triggered Builds" sap:VirtualizedContainerService.HintSize="565,1058" Reason="Triggered"> | |
<mtbwa:InvokeForReason.Variables> | |
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="symbolFiles" /> | |
</mtbwa:InvokeForReason.Variables> | |
<mtbwa:FindMatchingFiles DisplayName="Find Symbol Files" sap:VirtualizedContainerService.HintSize="543,22" mtbwt:BuildTrackingParticipant.Importance="Low" MatchPattern="[String.Format("{0}\**\*.pdb", BinariesDirectory)]" Result="[symbolFiles]" /> | |
<If Condition="[SourceAndSymbolServerSettings.IndexSources]" DisplayName="If SourceAndSymbolServerSettings.IndexSources" sap:VirtualizedContainerService.HintSize="543,393" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<TryCatch DisplayName="Try Index Sources" sap:VirtualizedContainerService.HintSize="418,287" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<TryCatch.Try> | |
<mtbwa:IndexSources DisplayName="Index Sources" FileList="[symbolFiles]" sap:VirtualizedContainerService.HintSize="400,100" /> | |
</TryCatch.Try> | |
<TryCatch.Catches> | |
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="404,21"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">False</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ActivityAction x:TypeArguments="s:Exception"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" /> | |
</ActivityAction.Argument> | |
<mtbwa:WriteBuildError sap:VirtualizedContainerService.HintSize="398,75" Message="[exception.Message]" /> | |
</ActivityAction> | |
</Catch> | |
</TryCatch.Catches> | |
</TryCatch> | |
</If.Then> | |
</If> | |
<If Condition="[SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.HasSymbolStorePath" sap:VirtualizedContainerService.HintSize="543,439" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<If.Then> | |
<TryCatch DisplayName="Try Publish Symbols" sap:VirtualizedContainerService.HintSize="418,333" mtbwt:BuildTrackingParticipant.Importance="Low"> | |
<TryCatch.Try> | |
<mtbwa:SharedResourceScope DisplayName="Synchronize Access to Symbol Store" sap:VirtualizedContainerService.HintSize="400,146" mtbwt:BuildTrackingParticipant.Importance="Low" MaxExecutionTime="[TimeSpan.Zero]" MaxWaitTime="[New TimeSpan(1, 0, 0)]" ResourceName="[SourceAndSymbolServerSettings.SymbolStorePath]"> | |
<mtbwa:PublishSymbols DisplayName="Publish Symbols" FileList="[symbolFiles]" sap:VirtualizedContainerService.HintSize="200,22" ProductName="[BuildDetail.BuildDefinition.Name]" StorePath="[SourceAndSymbolServerSettings.SymbolStorePath]" Version="[BuildDetail.BuildNumber]" /> | |
</mtbwa:SharedResourceScope> | |
</TryCatch.Try> | |
<TryCatch.Catches> | |
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="404,21"> | |
<sap:WorkflowViewStateService.ViewState> | |
<scg:Dictionary x:TypeArguments="x:String, x:Object"> | |
<x:Boolean x:Key="IsExpanded">False</x:Boolean> | |
</scg:Dictionary> | |
</sap:WorkflowViewStateService.ViewState> | |
<ActivityAction x:TypeArguments="s:Exception"> | |
<ActivityAction.Argument> | |
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" /> | |
</ActivityAction.Argument> | |
<mtbwa:WriteBuildError sap:VirtualizedContainerService.HintSize="398,75" Message="[exception.Message]" /> | |
</ActivityAction> | |
</Catch> | |
</TryCatch.Catches> | |
</TryCatch> | |
</If.Then> | |
</If> | |
</mtbwa:InvokeForReason> | |
</If.Then> | |
</If> | |
</Parallel> | |
</Sequence> | |
</TryCatch.Try> | |
</TryCatch> | |
</mtbwa:AgentScope> | |
<mtbwa:InvokeForReason DisplayName="Check In Gated Changes for CheckInShelveset Builds" sap:VirtualizedContainerService.HintSize="1171,51" Reason="CheckInShelveset"> | |
<mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" /> | |
</mtbwa:InvokeForReason> | |
</Sequence> | |
</Activity> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment