Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
Merge pull request #598 from NuGet/sb-ri1025
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Bommarito authored Oct 25, 2018
2 parents f05ccca + 06a3379 commit 418a50f
Show file tree
Hide file tree
Showing 58 changed files with 665 additions and 546 deletions.
7 changes: 0 additions & 7 deletions NuGet.Jobs.sln
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Validation", "Validation",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Common", "src\Validation.Common\Validation.Common.csproj", "{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Callback.Vcs", "src\Validation.Callback.Vcs\Validation.Callback.Vcs.csproj", "{185EF6D4-2172-40B1-A80E-811CE9D85840}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Runner", "src\Validation.Runner\Validation.Runner.csproj", "{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gallery", "Gallery", "{88725659-D5F8-49F9-9B7E-D87C5B9917D7}"
Expand Down Expand Up @@ -225,10 +223,6 @@ Global
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Release|Any CPU.Build.0 = Release|Any CPU
{185EF6D4-2172-40B1-A80E-811CE9D85840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{185EF6D4-2172-40B1-A80E-811CE9D85840}.Debug|Any CPU.Build.0 = Debug|Any CPU
{185EF6D4-2172-40B1-A80E-811CE9D85840}.Release|Any CPU.ActiveCfg = Release|Any CPU
{185EF6D4-2172-40B1-A80E-811CE9D85840}.Release|Any CPU.Build.0 = Release|Any CPU
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -426,7 +420,6 @@ Global
{CF7645A4-B4C0-4827-B6B0-AE42108071C6} = {57F34E9A-3A98-4E48-BF76-D49CB9CB3323}
{3E0A20C8-C6D2-4762-955D-C7BF35C2C9A7} = {B9D03824-A9CA-43AC-86D6-8BB399B9A228}
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
{185EF6D4-2172-40B1-A80E-811CE9D85840} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
{FA8C7905-985F-4919-AAA9-4B9A252F4977} = {88725659-D5F8-49F9-9B7E-D87C5B9917D7}
{12719498-B87E-4E92-8C2B-30046393CF85} = {BEC3DF4D-9A04-42C8-8B4F-D42750202B4D}
Expand Down
24 changes: 2 additions & 22 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ param (
[string]$SemanticVersion = '1.0.0-zlocal',
[string]$Branch = 'zlocal',
[string]$CommitSHA,
[string]$BuildBranch = '80b8f1b4a1cfe57367881e59fca063866dcaaa42'
[string]$BuildBranch = '795fed66b8bae2d248237ee5ec82e688e7174a42'
)

$msBuildVersion = 15;
Expand Down Expand Up @@ -42,21 +42,6 @@ Function Clean-Tests {
Remove-Item (Join-Path $PSScriptRoot "Results.*.xml")
}

Function Prepare-Vcs-Callback {
[CmdletBinding()]
param()

Trace-Log 'Preparing Validation.Callback.Vcs Package'

$ZipPackagePath = "src\Validation.Callback.Vcs\obj\Validation.Callback.Vcs.zip"

if (Test-Path $ZipPackagePath) {
Remove-Item $ZipPackagePath
}

Build-Solution $Configuration $BuildNumber -MSBuildVersion "$msBuildVersion" "src\Validation.Callback.Vcs\Validation.Callback.Vcs.csproj" -Target "Package" -MSBuildProperties "/P:PackageLocation=obj\Validation.Callback.Vcs.zip" -SkipRestore
}

Function Prepare-NuGetCDNRedirect {
[CmdletBinding()]
param()
Expand Down Expand Up @@ -132,13 +117,10 @@ Invoke-BuildStep 'Restoring solution packages' { `

Invoke-BuildStep 'Building solution' {
param($Configuration, $BuildNumber, $SolutionPath, $SkipRestore)
Build-Solution $Configuration $BuildNumber -MSBuildVersion "$msBuildVersion" $SolutionPath -SkipRestore:$SkipRestore `
Build-Solution $Configuration $BuildNumber -MSBuildVersion "$msBuildVersion" $SolutionPath -MSBuildProperties "/m" -SkipRestore:$SkipRestore `
} `
-args $Configuration, $BuildNumber, (Join-Path $PSScriptRoot "NuGet.Jobs.sln"), $SkipRestore `
-ev +BuildErrors

Invoke-BuildStep 'Prepare Validation.Callback.Vcs Package' { Prepare-Vcs-Callback } `
-ev +BuildErrors

Invoke-BuildStep 'Prepare NuGetCDNRedirect Package' { Prepare-NuGetCDNRedirect } `
-ev +BuildErrors
Expand Down Expand Up @@ -168,8 +150,6 @@ Invoke-BuildStep 'Creating artifacts' {
"src/ArchivePackages/ArchivePackages.csproj", `
"src/Search.GenerateAuxiliaryData/Search.GenerateAuxiliaryData.csproj", `
"src/Stats.RollUpDownloadFacts/Stats.RollUpDownloadFacts.csproj", `
"src/Validation.Callback.Vcs/Validation.Callback.Vcs.csproj", `
"src/Validation.Callback.Vcs/Validation.Callback.Vcs.WebApp.nuspec", `
"src/Validation.Runner/Validation.Runner.csproj", `
"src/NuGet.SupportRequests.Notifications/NuGet.SupportRequests.Notifications.csproj", `
"src/Validation.Helper/Validation.Helper.csproj", `
Expand Down
35 changes: 35 additions & 0 deletions sign.thirdparty.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<SignFilesDependsOn Include="EnumerateThirdPartyBinariesToSign" />
</ItemGroup>
<Target Name="EnumerateThirdPartyBinariesToSign" AfterTargets="AfterBuild" Condition="'$(SignType)' != 'none'">
<ItemGroup>
<ThirdPartyBinaries Include="AnglicanGeek.MarkdownMailer.dll" />
<ThirdPartyBinaries Include="Antlr3.Runtime.dll" />
<ThirdPartyBinaries Include="Autofac.dll" />
<ThirdPartyBinaries Include="Autofac.Extensions.DependencyInjection.dll" />
<ThirdPartyBinaries Include="Dapper.StrongName.dll" />
<ThirdPartyBinaries Include="Elmah.dll" />
<ThirdPartyBinaries Include="ICSharpCode.SharpZipLib.dll" />
<ThirdPartyBinaries Include="MarkdownSharp.dll" />
<ThirdPartyBinaries Include="Newtonsoft.Json.dll" />
<ThirdPartyBinaries Include="Newtonsoft.Json.Schema.dll" />
<ThirdPartyBinaries Include="Owin.dll" />
<ThirdPartyBinaries Include="Serilog.dll" />
<ThirdPartyBinaries Include="Serilog.Enrichers.Environment.dll" />
<ThirdPartyBinaries Include="Serilog.Enrichers.Process.dll" />
<ThirdPartyBinaries Include="Serilog.Extensions.Logging.dll" />
<ThirdPartyBinaries Include="Serilog.Sinks.ApplicationInsights.dll" />
<ThirdPartyBinaries Include="Serilog.Sinks.ColoredConsole.dll" />
<ThirdPartyBinaries Include="SerilogTraceListener.dll" />
<ThirdPartyBinaries Include="UAParser.dll" />
</ItemGroup>
<ItemGroup>
<FilesToSign Include="$(OutDir)%(ThirdPartyBinaries.Identity)" Condition="Exists('$(OutDir)%(ThirdPartyBinaries.Identity)')">
<Authenticode>3PartySHA2</Authenticode>
</FilesToSign>
</ItemGroup>
<Message Text="Files to sign:%0A@(FilesToSign, '%0A')" Importance="High" />
</Target>
</Project>
17 changes: 15 additions & 2 deletions src/ArchivePackages/ArchivePackages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Dapper.StrongName">
<Version>1.50.2</Version>
</PackageReference>
Expand All @@ -87,7 +92,15 @@
<Version>7.1.2</Version>
</PackageReference>
</ItemGroup>
<ItemGroup />
<PropertyGroup>
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\sign.targets" Condition="Exists('..\..\build\sign.targets')" />
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<Import Project="$(SignPath)\sign.scripts.targets" Condition="Exists('$(SignPath)\sign.scripts.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
20 changes: 20 additions & 0 deletions src/CopyAzureContainer/CopyAzureContainer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,29 @@
<PackageReference Include="WindowsAzure.Storage">
<Version>7.1.2</Version>
</PackageReference>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="tools\azcopy\ReadMe.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<ItemGroup>
<PowerShellScriptsToSign Include="InstallAzCopy.ps1"/>
<PowerShellScriptsToNotSign Include="PreDeploy.ps1"/>
<ExecutablesToNotSign Include="nssm.exe"/>
</ItemGroup>
<Import Project="$(SignPath)\sign.scripts.targets" Condition="Exists('$(SignPath)\sign.scripts.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Data.Edm">
<Version>5.7.0</Version>
</PackageReference>
Expand All @@ -106,6 +111,15 @@
<Version>7.1.2</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup>
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\sign.targets" Condition="Exists('..\..\build\sign.targets')" />
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<Import Project="$(SignPath)\sign.scripts.targets" Condition="Exists('$(SignPath)\sign.scripts.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
16 changes: 15 additions & 1 deletion src/Gallery.Maintenance/Gallery.Maintenance.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions">
<Version>1.0.0</Version>
</PackageReference>
Expand All @@ -74,6 +79,15 @@
<Version>4.3.3</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup>
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\sign.targets" Condition="Exists('..\..\build\sign.targets')" />
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<Import Project="$(SignPath)\sign.scripts.targets" Condition="Exists('$(SignPath)\sign.scripts.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
1 change: 0 additions & 1 deletion src/LoadTests/LoadTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\sign.targets" Condition="Exists('..\..\build\sign.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@
<Name>Validation.Common.Job</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="Scripts\nssm.exe" />
</ItemGroup>
Expand All @@ -85,6 +92,10 @@
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<Import Project="$(SignPath)\sign.scripts.targets" Condition="Exists('$(SignPath)\sign.scripts.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
8 changes: 8 additions & 0 deletions src/NuGet.Jobs.Common/NuGet.Jobs.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
<PackageReference Include="Dapper.StrongName">
<Version>1.50.2</Version>
</PackageReference>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection">
<Version>1.1.1</Version>
</PackageReference>
Expand Down Expand Up @@ -117,6 +122,9 @@
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Services.Status">
<Version>2.29.0</Version>
</PackageReference>
Expand All @@ -128,6 +133,10 @@
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<Import Project="$(SignPath)\sign.scripts.targets" Condition="Exists('$(SignPath)\sign.scripts.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,25 @@
<Name>Validation.Symbols.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<PackageReference Include="MicroBuild.Core">
<Version>0.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<SignPath>..\..\build</SignPath>
<SignPath Condition="'$(BUILD_SOURCESDIRECTORY)' != ''">$(BUILD_SOURCESDIRECTORY)\build</SignPath>
<SignPath Condition="'$(NuGetBuildPath)' != ''">$(NuGetBuildPath)</SignPath>
<SignType Condition="'$(SignType)' == ''">none</SignType>
</PropertyGroup>
<Import Project="$(SignPath)\sign.targets" Condition="Exists('$(SignPath)\sign.targets')" />
<Import Project="$(SignPath)\sign.microbuild.targets" Condition="Exists('$(SignPath)\sign.microbuild.targets')" />
<ItemGroup>
<PowerShellScriptsToSign Include="RunE2ETests.ps1"/>
</ItemGroup>
<Import Project="$(SignPath)\sign.scripts.targets" Condition="Exists('$(SignPath)\sign.scripts.targets')" />
<Import Project="..\..\sign.thirdparty.targets" />
</Project>
47 changes: 47 additions & 0 deletions src/NuGet.Services.Validation.Orchestrator/Scripts/RunE2ETests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
$AuthCredentials = "{0}:{1}" -f $OctopusParameters['Vsts.UserName'], $OctopusParameters['Vsts.Password']
$Base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($AuthCredentials))
$Headers = @{Authorization = ("Basic {0}" -f $Base64AuthInfo)}

$QueueParameters = @{}
$QueueParameters.Add('ConfigurationName', $OctopusParameters['Vsts.EndToEnd.Jobs.ConfigurationName'])

$QueueBody = @{
definition = @{
id = $OctopusParameters['Vsts.EndToEnd.BuildDefinitionId']
};
parameters = (ConvertTo-Json $QueueParameters)
}

$QueuedBuild = Invoke-RestMethod `
-Method Post `
-ContentType 'application/json' `
-Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds?api-version=2.0" `
-Headers $Headers `
-Body (ConvertTo-Json $QueueBody)

$BuildId = $QueuedBuild.id
Write-Host "Started build $BuildId to run end-to-end tests."

do {
Start-Sleep -s 20

$BuildResponse = Invoke-WebRequest `
-UseBasicParsing `
-Method Get `
-Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds/$($BuildId)?api-version=2.0" `
-Headers $Headers

$Build = ConvertFrom-Json $BuildResponse

Write-Host "Test run state:" $Build.status
Write-Host "******************************************"
} until ($Build.status -eq 'completed')

Write-Host "Test Run Completion Status:" $Build.result
Write-Host "******************************************"
$BuildUri = $Build.uri
Write-Host "For more details checkout:" "https://nuget.visualstudio.com/NuGetBuild/_build/index?buildId=$BuildUri"

if ($Build.result -ne 'succeeded') {
throw 'Test run failed'
}
Loading

0 comments on commit 418a50f

Please sign in to comment.