Philipp Häfelfinger
c11544245f
All checks were successful
piwigodotnet/pipeline/head This commit looks good
39 lines
831 B
Groovy
39 lines
831 B
Groovy
pipeline {
|
|
agent {
|
|
docker { image 'mcr.microsoft.com/dotnet/sdk:6.0'}
|
|
}
|
|
|
|
environment {
|
|
PWDNVERSION = "0.1.0"
|
|
// home is required to make dotnet work as if undived / is used which is not accessible
|
|
HOME = "${env.WORKSPACE}"
|
|
}
|
|
|
|
stages {
|
|
stage('nuget restore') {
|
|
steps {
|
|
sh "dotnet restore ${env.WORKSPACE}/src/PiwigoDotnet.sln"
|
|
}
|
|
}
|
|
|
|
stage('test') {
|
|
steps {
|
|
sh "dotnet test ${env.WORKSPACE}/src/PiwigoDotnet.sln --no-restore"
|
|
}
|
|
}
|
|
|
|
stage('packing') {
|
|
steps {
|
|
sh "dotnet pack ${env.WORKSPACE}/src/PiwigoDotnet.sln --no-restore -o ${env.WORKSPACE}/publish -p:Version=${env.PWDNVERSION}.${env.BUILD_NUMBER}"
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "publish/*.nupkg", onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|