From 279a8df3896bcff19c8aa6fa6f9d24c73949fc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Thu, 28 Mar 2024 13:17:39 +0100 Subject: [PATCH] Upload logs and artifacts for non-1ES VMR builds (#19224) --- eng/pipelines/templates/jobs/vmr-build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 1af3d63d7..d396d75b0 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -424,6 +424,13 @@ jobs: continueOnError: true condition: succeededOrFailed() + - ${{ if or(ne(variables['System.TeamProject'], 'internal'), eq(variables['Build.Reason'], 'PullRequest')) }}: + - publish: $(Build.StagingDirectory)/BuildLogs + artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) + displayName: Publish BuildLogs + continueOnError: true + condition: always() + # Only upload test results if enabled - ${{ if eq(parameters.runTests, 'True') }}: - task: PublishTestResults@2 @@ -454,3 +461,10 @@ jobs: SourceFolder: $(sourcesPath)/artifacts/packages TargetFolder: $(Build.ArtifactStagingDirectory)/publishing/packages displayName: Copy packages to Artifact Staging Directory + + - ${{ if or(ne(variables['System.TeamProject'], 'internal'), eq(variables['Build.Reason'], 'PullRequest')) }}: + - publish: $(Build.ArtifactStagingDirectory)/publishing + artifact: $(Agent.JobName)_Artifacts + displayName: Publish Artifacts + condition: succeededOrFailed() + continueOnError: true