From ea64dc5e45c2b8c5b6e629c563a86387d55fcdaf Mon Sep 17 00:00:00 2001 From: Daniel Donenfeld Date: Thu, 14 Feb 2019 14:46:00 -0800 Subject: [PATCH] Add debug printing to deploy-asm --- asm/scripts/deploy-asm.ps1 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/asm/scripts/deploy-asm.ps1 b/asm/scripts/deploy-asm.ps1 index 0019f4c..2fb6d18 100644 --- a/asm/scripts/deploy-asm.ps1 +++ b/asm/scripts/deploy-asm.ps1 @@ -44,20 +44,25 @@ function appveyorFinished { return $false } + Write-Host "[Appveyor] At Last Job: " + Write-Host $buildData + [datetime]$stop = ([datetime]::Now).AddMinutes($env:TIMEOUT_MINS) do { + Write-Host "[Appveyor] Checking Build Jobs" + (Get-AppVeyorBuild).build.jobs | Where-Object {$_.jobId -ne $env:APPVEYOR_JOB_ID} | Foreach-Object ` - -Begin { $anyFalse = $false } ` + -Begin { $allSuccess = $true } ` -Process { $job = $_ switch ($job.status) { "failed" { throw "AppVeyor's Job ($($job.jobId)) failed." } "success" { continue } - Default { $anyFalse = $true } + Default { $allSuccess = $false } } } ` - -End { if (!$anyFalse) { return $true } } + -End { if ($allSuccess) { return $true } } Start-sleep 5 } while (([datetime]::Now) -lt $stop) @@ -116,8 +121,13 @@ function collectAsm { } } +Write-Host "Starting asm deployment" + # Wait for all jobs if(appveyorFinished) { + + Write-Host "Appveyor Finished, collecting ASM" + # Collect ASM (currently from Appveyor only) collectAsm } \ No newline at end of file