Check to see if there are any artifacts that haven't been published (#125428)

* wait for all artifacts to be processed

* move get-pipelineartifact
This commit is contained in:
Tyler James Leonhardt 2021-06-03 11:43:23 -07:00 committed by GitHub
parent a56ef18247
commit 5966e9dfec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,13 +51,12 @@ $stages = @(
do {
Start-Sleep -Seconds 10
$res = Get-PipelineArtifact -Name 'vscode_*'
if (!$res) {
$artifacts = Get-PipelineArtifact -Name 'vscode_*'
if (!$artifacts) {
continue
}
$res | ForEach-Object {
$artifacts | ForEach-Object {
$artifactName = $_.name
if($set.Add($artifactName)) {
Write-Host "Processing artifact: '$artifactName. Downloading from: $($_.resource.downloadUrl)"
@ -107,6 +106,9 @@ do {
break
}
}
} while (!$otherStageFinished)
$artifacts = Get-PipelineArtifact -Name 'vscode_*'
$artifactsStillToProcess = $artifacts.Count -ne $set.Count
} while (!$otherStageFinished -or $artifactsStillToProcess)
Write-Host "Processed $($set.Count) artifacts."