Jenkins pipeline will now continue if tests fail.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit

This commit is contained in:
Harrison Deng 2024-07-19 17:50:17 +00:00
parent e2ffd6f976
commit d0217c2166

6
Jenkinsfile vendored
View File

@ -19,13 +19,13 @@ pipeline {
stages { stages {
stage("Test") { stage("Test") {
steps { 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)]) xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
} }
} }
stage("Publish") { stage("Publish") {
steps { 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' sh 'rm output/shop-modules/**/*.Tests.dll'
fingerprint 'output/shop-modules/**/Props.Shop.*' fingerprint 'output/shop-modules/**/Props.Shop.*'
sh 'cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.' sh 'cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.'
@ -37,7 +37,7 @@ pipeline {
stages { stages {
stage("Test") { stage("Test") {
steps { 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)]) xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
} }
} }