From 0ebbaa5ca4b67f9344f950967de99c6f19e6717d Mon Sep 17 00:00:00 2001 From: John McPherson Date: Tue, 27 Aug 2024 14:03:29 -0700 Subject: [PATCH 1/2] Run test tasks if succeededOrFailed --- templates/e2e-setup.yml | 4 ++++ templates/e2e-test.template.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/templates/e2e-setup.yml b/templates/e2e-setup.yml index bbdaf25562..9537b6ff77 100644 --- 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 index 9b4e6a4025..4e0d3d6fe5 100644 --- 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' From e94d9066f97c1ceb79c2d2b31809840b3d5a36d5 Mon Sep 17 00:00:00 2001 From: John McPherson Date: Tue, 27 Aug 2024 14:13:49 -0700 Subject: [PATCH 2/2] Include templates in PR trigger --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 250b63f452..d1a0db7838 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,6 +10,7 @@ pr: paths: include: - azure-pipelines.yml + - templates/* - src/* - schemas/JSON/manifests/*