Coroutine/Jenkinsfile

36 lines
727 B
Plaintext
Raw Permalink Normal View History

2020-02-28 22:30:42 +01:00
pipeline {
agent any
stages {
stage('Test') {
2020-02-28 22:30:42 +01:00
steps {
sh 'dotnet test --collect:"XPlat Code Coverage"'
2020-02-28 22:30:42 +01:00
}
}
stage('Pack') {
steps {
2022-10-31 13:02:30 +01:00
sh 'find . -type f -name "*.nupkg" -delete'
sh 'dotnet pack --version-suffix ${BUILD_NUMBER}'
2020-02-28 22:30:42 +01:00
}
}
stage('Publish') {
2021-01-01 11:10:35 +01:00
when {
2021-10-24 00:44:30 +02:00
branch 'main'
2021-01-01 11:10:35 +01:00
}
2020-02-28 22:30:42 +01:00
steps {
2022-10-31 13:02:30 +01:00
sh 'dotnet nuget push -s http://localhost:5000/v3/index.json **/*.nupkg -k $BAGET -n'
2020-02-28 22:30:42 +01:00
}
}
2021-03-20 21:28:36 +01:00
}
post {
always {
nunit testResultsPattern: '**/TestResults.xml'
cobertura coberturaReportFile: '**/coverage.cobertura.xml'
}
2020-02-28 22:30:42 +01:00
}
environment {
2020-02-28 22:31:24 +01:00
BAGET = credentials('3db850d0-e6b5-43d5-b607-d180f4eab676')
2020-02-28 22:30:42 +01:00
}
2021-01-01 11:10:35 +01:00
}