37 lines
693 B
Groovy
37 lines
693 B
Groovy
pipeline
|
|||
|
|
{
|
||
|
|
agent { dockerfile true }
|
||
|
|
stages
|
||
|
|
{
|
||
|
|
stage('Build')
|
||
|
|
{
|
||
|
|
steps
|
||
|
|
{
|
||
|
|
sh 'dotnet restore'
|
||
|
|
sh 'dotnet build -c Release --no-restore'
|
||
|
|
sh "dotnet pack -c Release --no-restore --no-build -p:PackageVersion=1.0.${env.BUILD_NUMBER}"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
stage('Archive artifacts')
|
||
|
|
{
|
||
|
|
steps
|
||
|
|
{
|
||
|
|
archiveArtifacts artifacts:'*/bin/Release/**/*.nupkg'
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
stage('Publish nuget artifacts')
|
||
|
|
{
|
||
|
|
steps
|
||
|
|
{
|
||
|
|
sh "./JenkinsfileScripts/PublishNugetArtifacts.sh ${env.BUILD_NUMBER}"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
post {
|
||
|
|
always {
|
||
|
|
deleteDir() /* clean up our workspace */
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|