From d0217c2166fd19be133f3ba6cd5d4d9246c952f3 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Fri, 19 Jul 2024 17:50:17 +0000 Subject: [PATCH] Jenkins pipeline will now continue if tests fail. --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3a754ca..f58e715 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,13 +19,13 @@ pipeline { stages { stage("Test") { steps { - sh 'conda run -n base dotnet test --logger xunit --no-restore Props.Shop/**/*.Tests.csproj' + sh returnStatus: true, script: 'conda run -n base dotnet test --logger xunit --no-restore Props.Shop/**/*.Tests.csproj' xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)]) } } stage("Publish") { steps { - sh 'conda run -n base dotnet publish --configuration Release --output output/shop-modules Props.Shop/*.csproj' + sh 'conda run -n base dotnet publish --configuration Release --output output/shop-modules Props.Shop/**/*.csproj' sh 'rm output/shop-modules/**/*.Tests.dll' fingerprint 'output/shop-modules/**/Props.Shop.*' sh 'cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.' @@ -37,7 +37,7 @@ pipeline { stages { stage("Test") { steps { - sh 'conda run -n base dotnet test --logger xunit --no-restore Props.Tests/Props.Tests.csproj' + sh returnStatus: true, script: 'conda run -n base dotnet test --logger xunit --no-restore Props.Tests/Props.Tests.csproj' xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)]) } }