From d92e88415bb2c7625823fe9f6139751571b0fc9a Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 5 Feb 2021 08:28:16 -0800 Subject: [PATCH] Add succeeded() condition to dependent jobs (#1605) Without checking for succeeded() these jobs will run regardless of the success or failure of the TagRepository step. --- eng/pipelines/templates/stages/archetype-cpp-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index 5b2a5b40c..5d551b196 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -46,7 +46,7 @@ stages: - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}: - deployment: PublishDocs displayName: Publish Docs to GitHub pages - condition: ne(variables['Skip.PublishDocs'], 'true') + condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) environment: githubio # Release tag must exist for link substitution to work dependsOn: TagRepository @@ -77,7 +77,7 @@ stages: - ${{ if ne(artifact.skipPublishVcpkg, 'true') }}: - deployment: PublishVcpkg displayName: Publish to vcpkg - condition: ne(variables['Skip.PublishVcpkg'], 'true') + condition: and(succeeded(), ne(variables['Skip.PublishVcpkg'], 'true')) environment: github # This step requires the tag step dependsOn: TagRepository