Skip to content

Commit

Permalink
wait for all artifacts to be processed
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt committed Jun 3, 2021
1 parent 60651a0 commit 54769c9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions build/azure-pipelines/product-publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ $stages = @(
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
)

$artifacts = Get-PipelineArtifact -Name 'vscode_*'
do {
Start-Sleep -Seconds 10

$res = Get-PipelineArtifact -Name 'vscode_*'

if (!$res) {
if (!$artifacts) {
continue
}

$res | ForEach-Object {
$artifacts | ForEach-Object {
$artifactName = $_.name
if($set.Add($artifactName)) {
Write-Host "Processing artifact: '$artifactName. Downloading from: $($_.resource.downloadUrl)"
Expand Down Expand Up @@ -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."

0 comments on commit 54769c9

Please sign in to comment.