From b3e0fc3de2893565fb0776c025e1494ba1cf7207 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Thu, 1 Dec 2022 14:34:27 -0800 Subject: [PATCH] Use same CustomCondition as success task --- eng/common/pipelines/templates/steps/publish-artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/publish-artifact.yml b/eng/common/pipelines/templates/steps/publish-artifact.yml index fc295f6801d9e..6e9bdd0f30bd4 100644 --- a/eng/common/pipelines/templates/steps/publish-artifact.yml +++ b/eng/common/pipelines/templates/steps/publish-artifact.yml @@ -20,7 +20,7 @@ steps: path: '${{ parameters.ArtifactPath }}' - task: PublishPipelineArtifact@1 - condition: failed() + condition: and(failed(), ${{ parameters.CustomCondition }}) displayName: 'Publish failed ${{ parameters.ArtifactName }} Artifacts' inputs: artifactName: '${{ parameters.ArtifactName }}-FailedAttempt$(System.JobAttempt)'