2022-10-25 22:17:59 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2022-10-25 22:31:58 +02:00
|
|
|
docker { image 'mcr.microsoft.com/dotnet/sdk:6.0'}
|
2022-10-25 22:17:59 +02:00
|
|
|
}
|
|
|
|
|
2022-10-25 22:41:49 +02:00
|
|
|
environment {
|
2022-10-25 22:59:56 +02:00
|
|
|
PWDNVERSION = "0.1.0"
|
|
|
|
// home is required to make dotnet work as if undived / is used which is not accessible
|
2022-10-25 22:44:52 +02:00
|
|
|
HOME = "${env.WORKSPACE}"
|
2022-10-25 22:41:49 +02:00
|
|
|
}
|
|
|
|
|
2022-10-25 22:17:59 +02:00
|
|
|
stages {
|
|
|
|
stage('nuget restore') {
|
|
|
|
steps {
|
2022-10-25 22:43:46 +02:00
|
|
|
sh "dotnet restore ${env.WORKSPACE}/src/PiwigoDotnet.sln"
|
2022-10-25 22:17:59 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-25 22:59:56 +02:00
|
|
|
stage('test') {
|
|
|
|
steps {
|
|
|
|
sh "dotnet test ${env.WORKSPACE}/src/PiwigoDotnet.sln"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('packing') {
|
|
|
|
steps {
|
|
|
|
sh "dotnet pack ${env.WORKSPACE}/src/PiwigoDotnet.sln -o ${env.WORKSPACE}/publish -p:Version=${env.PWDNVERSION}.${env.BUILD_NUMBER}"
|
|
|
|
}
|
|
|
|
}
|
2022-10-25 22:17:59 +02:00
|
|
|
|
2022-10-25 22:59:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
archiveArtifacts artifacts: "publish", onlyIfSuccessful: true
|
|
|
|
}
|
2022-10-25 22:17:59 +02:00
|
|
|
}
|
|
|
|
}
|