updates jenkins to publish nuget to gitea
All checks were successful
piwigodotnet/pipeline/head This commit looks good

This commit is contained in:
Philipp Häfelfinger 2022-11-03 15:17:33 +01:00
parent a36ac7442d
commit 4684829f81

16
Jenkinsfile vendored
View File

@ -10,9 +10,15 @@ pipeline {
} }
stages { stages {
stage('cleaning workspace') { stage('preparing workspace') {
steps { steps {
sh "rm -rf ${env.WORKSPACE}/publish" cleanWs deleteDirs: true, notFailBuild: true, patterns: [[pattern: '.nuget/NuGet/NuGet.Config', type: 'INCLUDE']]
dir('publish') {
deleteDir()
}
withCredentials([usernamePassword(credentialsId: 'giteaNugetPushCreds', passwordVariable: 'NUGETPWD', usernameVariable: 'NUGETUSR')]) {
sh 'dotnet nuget add source --name gitea --username $NUGETUSR --password $NUGETPWD --store-password-in-clear-text https://git.haefelfinger.net/api/packages/piwigo/nuget/index.json'
}
} }
} }
@ -34,6 +40,12 @@ pipeline {
} }
} }
stage('nuget publish') {
steps {
sh "dotnet nuget push --source gitea ${env.WORKSPACE}/publish/*.nupkg"
}
}
} }
post { post {