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