commit 50104825c0cc47ff688c5de8c129d77fc8c75128
parent 6567cf1b74afffed897a9bca085f14570c046a2f
Author: JohnMcPMS <johnmcp@microsoft.com>
Date: Tue, 27 Aug 2024 16:47:14 -0700
Run test tasks if succeededOrFailed (#4759)
## Change
Add `condition: succeededOrFailed()` to the tasks run in the e2e
templates that were missing them.
Diffstat:
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
@@ -10,6 +10,7 @@ pr:
paths:
include:
- azure-pipelines.yml
+ - templates/*
- src/*
- schemas/JSON/manifests/*
diff --git a/templates/e2e-setup.yml b/templates/e2e-setup.yml
@@ -31,6 +31,7 @@ steps:
Write-Host "##vso[task.setvariable variable=TestSigningCert.CerPath;]$certCerPath"
Write-Host "##vso[task.setvariable variable=TestSigningCert.Password;]$certPassword"
displayName: Create test codesigning cert
+ condition: succeededOrFailed()
- pwsh: |
$httpsCertPath = Join-Path $(Agent.TempDirectory) HttpsCert.pfx
@@ -43,12 +44,15 @@ steps:
Write-Host "##vso[task.setvariable variable=HttpsCert.Path;]$httpsCertPath"
Write-Host "##vso[task.setvariable variable=HttpsCert.Password;]$httpsCertPassword"
displayName: Create and install localhost HTTPS cert
+ condition: succeededOrFailed()
- pwsh: ${{ parameters.sourceDir }}\src\LocalhostWebServer\Run-LocalhostWebServer.ps1 -CertPath $(HttpsCert.Path) -CertPassword $(HttpsCert.Password) -OutCertFile $(Agent.TempDirectory)\servercert.cer ${{ parameters.localhostWebServerArgs }}
displayName: Launch LocalhostWebServer
+ condition: succeededOrFailed()
- task: PowerShell@2
displayName: Setup Local PS Repository
+ condition: succeededOrFailed()
inputs:
filePath: '${{ parameters.sourceDir }}\src\AppInstallerCLIE2ETests\TestData\Configuration\Init-TestRepository.ps1'
arguments: '-Force'
diff --git a/templates/e2e-test.template.yml b/templates/e2e-test.template.yml
@@ -18,6 +18,7 @@ steps:
- task: VSTest@2
displayName: Run ${{ parameters.title }}
+ condition: succeededOrFailed()
inputs:
testRunTitle: ${{ parameters.title }}
testSelector: 'testAssemblies'