From 83b8feeb35b44ea27a798925b36597b6fa53d445 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Wed, 30 Jun 2021 13:41:16 -0700 Subject: [PATCH] Add dependency on LiveTest to release (#2457) * Add dependency on LiveTest to release * Add DependsOn to archetype-cpp-release.yml stages, conditions around LiveTest (if we don't execute live tests don't require them for release) * Remove template conditions for LiveTest and always require it * Revert "Remove template conditions for LiveTest and always require it" This reverts commit dc0615ca084b7bb476cbc3806df70f92f2bf0304. --- eng/pipelines/templates/stages/archetype-cpp-release.yml | 6 ++++-- eng/pipelines/templates/stages/archetype-sdk-client.yml | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index 2a75fcc18..092da714b 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -3,13 +3,15 @@ parameters: ArtifactName: 'not-specified' ServiceDirectory: not-specified TestPipeline: false + DependsOn: + - Build stages: - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: - ${{ each artifact in parameters.Artifacts }}: - stage: Release_${{ replace(artifact.Name, '-', '_') }} displayName: 'Release ${{artifact.name}}' - dependsOn: Build + dependsOn: ${{ parameters.DependsOn }} condition: and(succeeded(), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-cpp'), ne(variables['Skip.AllRelease'], 'true')) jobs: @@ -190,7 +192,7 @@ stages: - ${{if eq(variables['System.TeamProject'], 'internal') }}: - stage: Integration - dependsOn: Build + dependsOn: ${{ parameters.DependsOn }} condition: and(succeeded(), or(eq(variables['PublishDailyVcpkg'], 'true'), eq(variables['Build.Reason'],'Schedule'))) jobs: - job: PublishDailyVcpkg diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 347e0ee70..14aa8ce92 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -59,7 +59,10 @@ stages: parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} DependsOn: - - Build + - Build + # Only depend on `LiveTest` if there are live tests to execute + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(parameters.LiveTestCtestRegex, '')) }}: + - LiveTest Artifacts: ${{ parameters.Artifacts }} ArtifactName: packages ${{ if eq(parameters.ServiceDirectory, 'template') }}: