From b84e3e3bbc85430e72b8d8a6624d6d52328fe135 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Mar 2021 06:47:51 +0100 Subject: [PATCH] use condition istead of continueonerror --- build/azure-pipelines.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 28567ef236..a22bdbccda 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -163,34 +163,36 @@ stages: inlineScript: > @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json" - task: Npm@1 + name: PrepareTask displayName: npm install (AcceptanceTest) inputs: workingDir: 'src\Umbraco.Tests.AcceptanceTest' - task: Npm@1 displayName: Run Cypress (Desktop) - continueOnError: true + condition: eq(PrepareTask.result,'Succeeded') inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos"' + customCommand: 'run test -- --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"' - task: Npm@1 displayName: Run Cypress (Tablet portrait) - continueOnError: true + condition: eq(PrepareTask.result,'Succeeded') inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos"' + customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"' - task: Npm@1 displayName: Run Cypress (Mobile protrait) - continueOnError: true + condition: eq(PrepareTask.result,'Succeeded') inputs: workingDir: src\Umbraco.Tests.AcceptanceTest command: 'custom' - customCommand: 'run test -- --config="videoUploadOnPasses=false,viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos"' + customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"' - task: PublishPipelineArtifact@1 displayName: "Publish test artifacts" + condition: eq(PrepareTask.result,'Succeeded') inputs: targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts' artifact: 'Test artifacts'