diff --git a/tools/devops/automation/templates/tests/build.yml b/tools/devops/automation/templates/tests/build.yml index afeba6c0175..5447aa6bdef 100644 --- a/tools/devops/automation/templates/tests/build.yml +++ b/tools/devops/automation/templates/tests/build.yml @@ -158,11 +158,11 @@ steps: - ${{ if or(contains(variables['Build.Reason'], 'ResourceTrigger'), contains(variables['Build.Reason'], 'BuildCompletion')) }}: - download: macios displayName: Download PkgsVersions.json - patterns: '**/PkgsVersions.json' + artifact: PkgsVersions - download: macios displayName: Download WorkloadRollback.json - patterns: '**/WorkloadRollback.json' + artifact: WorkloadRollback - download: macios displayName: Download packages diff --git a/tools/devops/automation/templates/tests/download-artifacts.yml b/tools/devops/automation/templates/tests/download-artifacts.yml new file mode 100644 index 00000000000..df4db968ab6 --- /dev/null +++ b/tools/devops/automation/templates/tests/download-artifacts.yml @@ -0,0 +1,21 @@ +steps: + +- pwsh: | + if (Test-Path "$Env:SYSTEM_DEFAULTWORKINGDIRECTORY/Reports" -PathType Container) { + Remove-Item -Path "$Env:SYSTEM_DEFAULTWORKINGDIRECTORY/Reports" -Force -Recurse + } + displayName: "Remove artifacts" + condition: always() + +# Download the test report to write the comment. +- task: DownloadPipelineArtifact@2 + displayName: Download Test Summary + continueOnError: true # there are tests that do not have the test results, so far only the install_sources has it + inputs: + patterns: "**/TestSummary.md" + allowFailedBuilds: true + path: $(System.DefaultWorkingDirectory)\Reports + +- pwsh: + Get-ChildItem $(System.DefaultWorkingDirectory)/Reports -Recurse + displayName: "Debug downloaded artifacts."