Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Build Definition - VSO + Kudu Deploy
<Activity mc:Ignorable="sads sap sap2010" x:Class="TfsBuild.Process" this:Process.TestSpec="[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec(&quot;**\*test*.dll&quot;)]" this:Process.BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" this:Process.CleanRepository="[True]" 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.MSBuildPlatform="[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]" this:Process.MSBuildMultiProc="[True]" this:Process.Verbosity="[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]" this:Process.SupportedReasons="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated" this:Process.BuildProcessVersion="11.0"
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:mtba="clr-namespace:Microsoft.TeamFoundation.Build.Activities;assembly=Microsoft.TeamFoundation.Build.Activities"
xmlns:mtbac="clr-namespace:Microsoft.TeamFoundation.Build.Activities.Core;assembly=Microsoft.TeamFoundation.Build.Activities"
xmlns:mtbag="clr-namespace:Microsoft.TeamFoundation.Build.Activities.Git;assembly=Microsoft.TeamFoundation.Build.Activities"
xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client"
xmlns:mtbc1="clr-namespace:Microsoft.TeamFoundation.Build.Common;assembly=Microsoft.TeamFoundation.Build.Common"
xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow"
xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow"
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"
xmlns:mtvc1="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:sa="clr-namespace:System.Activities;assembly=System.Activities"
xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/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="SolutionToBuild" Type="InArgument(x:String)" />
<x:Property Name="ConfigurationToBuild" Type="InArgument(x:String)" />
<x:Property Name="PlatformToBuild" Type="InArgument(x:String)" />
<x:Property Name="TestSpec" Type="InArgument(mtbwa:AgileTestPlatformSpec)" />
<x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" />
<x:Property Name="CleanRepository" Type="InArgument(x:Boolean)" />
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
<x:Property Name="MSBuildMultiProc" Type="InArgument(x:Boolean)" />
<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="BuildProcessVersion" Type="x:String" />
<x:Property Name="AzureGitRepository" Type="InArgument(x:String)" />
</x:Members>
<this:Process.SolutionToBuild>
<InArgument x:TypeArguments="x:String" />
</this:Process.SolutionToBuild>
<this:Process.ConfigurationToBuild>
<InArgument x:TypeArguments="x:String" />
</this:Process.ConfigurationToBuild>
<this:Process.PlatformToBuild>
<InArgument x:TypeArguments="x:String" />
</this:Process.PlatformToBuild>
<this:Process.MSBuildArguments>
<InArgument x:TypeArguments="x:String" />
</this:Process.MSBuildArguments>
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection>
<mtbw:ProcessParameterMetadata Category="#100 Git" Description="Set this to true to start with a clean repository on each build." DisplayName="1. Clean repository" ParameterName="CleanRepository" />
<mtbw:ProcessParameterMetadata Category="#100 Git" Description="Git Repository of Azure Website. (example: https://&lt;username&gt;:&lt;password&gt;@&lt;website-name&gt;.scm.azurewebsites.net:443/&lt;website-name&gt;.git)" DisplayName="Azure Git Repository" ParameterName="AzureGitRepository" Required="True" />
<mtbw:ProcessParameterMetadata Category="#200 Build" Description="Relative path to the solution/project file you want to build." DisplayName="1. Solution to build" ParameterName="SolutionToBuild" Required="True" />
<mtbw:ProcessParameterMetadata Category="#200 Build" Description="Specify the configuration you want to build (i.e. Debug)." DisplayName="2. Configuration to build" ParameterName="ConfigurationToBuild" />
<mtbw:ProcessParameterMetadata Category="#200 Build" Description="Specify the platform you want to build (i.e. x86)." DisplayName="3. Platform to build" ParameterName="PlatformToBuild" />
<mtbw:ProcessParameterMetadata Category="#250 Test" Description="Specify which tests to run for this build." DisplayName="1. Automated test" ParameterName="TestSpec" />
<mtbw:ProcessParameterMetadata Category="#300 Advanced" Description="Specify the format for the number of this build." DisplayName="Build number format" ParameterName="BuildNumberFormat" />
<mtbw:ProcessParameterMetadata Category="#300 Advanced" Description="Specify the amount of information that you want to log to the database during the build. Diagnostic outputs will already be collected in files on the drop location." DisplayName="Database logging verbosity" ParameterName="Verbosity" />
<mtbw:ProcessParameterMetadata Category="#300 Advanced" Description="Specify additional MSBuild arguments." DisplayName="MSBuild arguments" ParameterName="MSBuildArguments" />
<mtbw:ProcessParameterMetadata Category="#300 Advanced" Description="Use more than one processor per build." DisplayName="MSBuild multi-proc" ParameterName="MSBuildMultiProc" />
<mtbw:ProcessParameterMetadata Category="#300 Advanced" Description="Specify the MSBuild platform to use. Defaults to the OS." DisplayName="MSBuild Platform" ParameterName="MSBuildPlatform" />
</mtbw:ProcessParameterMetadataCollection>
</this:Process.Metadata>
<sap2010:WorkflowViewState.IdRef>TfsBuild.Process_1</sap2010:WorkflowViewState.IdRef>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence DisplayName="Overall build process" sap2010:WorkflowViewState.IdRef="Sequence_2">
<Sequence.Variables>
<Variable x:TypeArguments="s:String[]" Name="ProjectsToBuild" />
<Variable x:TypeArguments="s:String[]" Name="ConfigurationsToBuild" />
<Variable x:TypeArguments="mtbc1:BuildParameter[]" Name="TestSpecs" />
</Sequence.Variables>
<mtbac:SetBuildNumber DropLocation="{x:Null}" BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update build number" sap2010:WorkflowViewState.IdRef="SetBuildNumber_1" />
<mtbwa:AgentScope DataToIgnore="" DisplayName="Run on agent" sap2010:WorkflowViewState.IdRef="AgentScope_1" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<mtbac:InitializeEnvironment BinariesFolder="bin" DisplayName="Initialize environment" sap2010:WorkflowViewState.IdRef="InitializeEnvironment_1" SourceFolder="src" TestResultsFolder="tst" />
<mtbag:GitPull CleanRepository="[CleanRepository]" DisplayName="Pull sources from Git repo" Enabled="True" sap2010:WorkflowViewState.IdRef="GitPull_1" />
<TryCatch DisplayName="Try" sap2010:WorkflowViewState.IdRef="TryCatch_1" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Finally>
<mtbac:DropBinaries DestinationPath="{x:Null}" DisplayName="Copy binaries to drop" Enabled="True" sap2010:WorkflowViewState.IdRef="DropBinaries_1" />
</TryCatch.Finally>
<TryCatch.Try>
<Sequence DisplayName="Compile and Test" sap2010:WorkflowViewState.IdRef="Sequence_1">
<Assign x:TypeArguments="s:String[]" sap2010:WorkflowViewState.IdRef="Assign`1_1" mtbwt:BuildTrackingParticipant.Importance="None" To="[ConfigurationsToBuild]" Value="[{ New PlatformConfiguration(PlatformToBuild, ConfigurationToBuild).ToString() }]" />
<Assign x:TypeArguments="s:String[]" sap2010:WorkflowViewState.IdRef="Assign`1_2" mtbwt:BuildTrackingParticipant.Importance="None" To="[ProjectsToBuild]" Value="[{ SolutionToBuild }]" />
<mtba:RunMSBuild CommandLineArguments="[String.Format(&quot;/p:SkipInvalidConfigurations=true {0}&quot;, MSBuildArguments)]" ConfigurationsToBuild="[ConfigurationsToBuild]" DisplayName="Run MSBuild for solution" Enabled="True" sap2010:WorkflowViewState.IdRef="RunMSBuild_1" MSBuildMultiProc="[MSBuildMultiProc]" OutputLocation="SingleFolder" ProjectsToBuild="[ProjectsToBuild]" RestoreNuGetPackages="True" ToolPlatform="[MSBuildPlatform.ToString()]" Verbosity="Normal" />
<Assign x:TypeArguments="mtbc1:BuildParameter[]" sap2010:WorkflowViewState.IdRef="Assign`1_3" mtbwt:BuildTrackingParticipant.Importance="None" To="[TestSpecs]" Value="[{ TestSpec.CreateBuildParameter() }]" />
<mtba:RunAgileTestRunner ConfigurationsToTest="[ConfigurationsToBuild]" DisplayName="Run VS Test Runner" Enabled="True" sap2010:WorkflowViewState.IdRef="RunAgileTestRunner_1" TestSpecs="[TestSpecs]" />
<mtbwa:InvokeProcess Arguments="[&quot;/c git.exe remote add azure &quot; + [AzureGitRepository]]" FileName="cmd" sap2010:WorkflowViewState.IdRef="InvokeProcess_2" WorkingDirectory="C:\a\src">
<mtbwa:InvokeProcess.ErrorDataReceived>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="errOutput" />
</ActivityAction.Argument>
<mtbwa:WriteBuildError sap2010:WorkflowViewState.IdRef="WriteBuildError_2" 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 sap2010:WorkflowViewState.IdRef="WriteBuildMessage_2" Message="[stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
</ActivityAction>
</mtbwa:InvokeProcess.OutputDataReceived>
</mtbwa:InvokeProcess>
<mtbwa:InvokeProcess Arguments="/c git.exe push azure master" FileName="cmd" sap2010:WorkflowViewState.IdRef="InvokeProcess_1" WorkingDirectory="C:\a\src">
<mtbwa:InvokeProcess.ErrorDataReceived>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="errOutput" />
</ActivityAction.Argument>
<mtbwa:WriteBuildWarning sap2010:WorkflowViewState.IdRef="WriteBuildWarning_1" Message="[errOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
</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 sap2010:WorkflowViewState.IdRef="WriteBuildMessage_1" Message="[stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
</ActivityAction>
</mtbwa:InvokeProcess.OutputDataReceived>
</mtbwa:InvokeProcess>
</Sequence>
</TryCatch.Try>
</TryCatch>
</mtbwa:AgentScope>
<sads:DebugSymbol.Symbol>dw1DOlxFbXB0eS54YW1sAA==</sads:DebugSymbol.Symbol>
</Sequence>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="SetBuildNumber_1" sap:VirtualizedContainerService.HintSize="440,21.7142857142857" />
<sap2010:ViewStateData Id="InitializeEnvironment_1" sap:VirtualizedContainerService.HintSize="418.285714285714,21.7142857142857" />
<sap2010:ViewStateData Id="GitPull_1" sap:VirtualizedContainerService.HintSize="418.285714285714,21.7142857142857" />
<sap2010:ViewStateData Id="DropBinaries_1" sap:VirtualizedContainerService.HintSize="200,21.7142857142857" />
<sap2010:ViewStateData Id="Assign`1_1" sap:VirtualizedContainerService.HintSize="234.285714285714,21.7142857142857" />
<sap2010:ViewStateData Id="Assign`1_2" sap:VirtualizedContainerService.HintSize="234.285714285714,21.7142857142857" />
<sap2010:ViewStateData Id="RunMSBuild_1" sap:VirtualizedContainerService.HintSize="234.285714285714,21.7142857142857" />
<sap2010:ViewStateData Id="Assign`1_3" sap:VirtualizedContainerService.HintSize="234.285714285714,21.7142857142857" />
<sap2010:ViewStateData Id="RunAgileTestRunner_1" sap:VirtualizedContainerService.HintSize="234.285714285714,21.7142857142857" />
<sap2010:ViewStateData Id="WriteBuildError_2" sap:VirtualizedContainerService.HintSize="200,21.7142857142857" />
<sap2010:ViewStateData Id="WriteBuildMessage_2" sap:VirtualizedContainerService.HintSize="200,21.7142857142857" />
<sap2010:ViewStateData Id="InvokeProcess_2" sap:VirtualizedContainerService.HintSize="234.285714285714,278.857142857143" />
<sap2010:ViewStateData Id="WriteBuildWarning_1" sap:VirtualizedContainerService.HintSize="200,21.7142857142857" />
<sap2010:ViewStateData Id="WriteBuildMessage_1" sap:VirtualizedContainerService.HintSize="200,21.7142857142857" />
<sap2010:ViewStateData Id="InvokeProcess_1" sap:VirtualizedContainerService.HintSize="234.285714285714,278.857142857143" />
<sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="256,1029.71428571429">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="TryCatch_1" sap:VirtualizedContainerService.HintSize="418.285714285714,1347.42857142857" />
<sap2010:ViewStateData Id="AgentScope_1" sap:VirtualizedContainerService.HintSize="440,1594.28571428571">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="461.714285714286,1779.42857142857">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="TfsBuild.Process_1" sap:VirtualizedContainerService.HintSize="501.714285714286,1859.42857142857">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="ShouldCollapseAll">False</x:Boolean>
<x:Boolean x:Key="ShouldExpandAll">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment