Coroutine/Jenkinsfile

33 lines
713 B
Text
Raw 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"'
nunit testResultsPattern: '**/TestResults.xml'
cobertura coberturaReportFile: '**/coverage.cobertura.xml'
2020-02-28 22:30:42 +01:00
}
}
stage('Pack') {
steps {
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 {
branch 'master'
}
2020-02-28 22:30:42 +01:00
steps {
2021-01-01 11:10:35 +01:00
sh 'dotnet nuget push -s http://localhost:5000/v3/index.json **/*.nupkg -k $BAGET -n true'
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
}