diff --git a/eng/pipelines/templates/steps/build.yml b/eng/pipelines/templates/steps/build.yml index d5d882d8586..375539e28f2 100644 --- a/eng/pipelines/templates/steps/build.yml +++ b/eng/pipelines/templates/steps/build.yml @@ -84,8 +84,7 @@ steps: ServiceDirectory: ${{parameters.ServiceDirectory}} - pwsh: | - $artifacts = Get-ChildItem -Recurse -Force "$(Build.ArtifactStagingDirectory)/PackageInfo/*.json" ` - | ForEach-Object { $_.Name.Replace(".json", "") } + $artifacts = "$(ArtifactPackageNames)".Split(",") foreach ($artifact in $artifacts) {