Added cleanup step to Jenkins pipeline.
Removes all items in publish folders after pipeline complete. Fixed publish configuration in pipeline.
This commit is contained in:
parent
093670385e
commit
190ea16b02
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@ -17,7 +17,7 @@ pipeline {
|
|||||||
stage("Publish") {
|
stage("Publish") {
|
||||||
steps {
|
steps {
|
||||||
dotnetPublish configuration: 'Release', noRestore: true, project: 'Props.Shop/Props.Shop.sln', selfContained: false, unstableIfWarnings: true
|
dotnetPublish configuration: 'Release', noRestore: true, project: 'Props.Shop/Props.Shop.sln', selfContained: false, unstableIfWarnings: true
|
||||||
archiveArtifacts artifacts: 'Props.Shop/**/bin/Release/**/publish/Props.Shop.*', excludes: 'Props.Shop/*.Tests/**/*', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
|
archiveArtifacts artifacts: 'Props.Shop/**/bin/Release/**/publish/Props*', excludes: 'Props.Shop/*.Tests/**/*', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
|
||||||
sh "python3 scripts/load_shop_modules.py"
|
sh "python3 scripts/load_shop_modules.py"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -38,11 +38,20 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage("Publish") {
|
stage("Publish") {
|
||||||
steps {
|
steps {
|
||||||
dotnetPublish noRestore: true, project: 'Props', sdk: 'Default .NET SDK'
|
dotnetPublish configuration: 'Release', noRestore: true, project: 'Props', sdk: 'Default .NET SDK'
|
||||||
archiveArtifacts artifacts: 'Props/bin/Release/**/publish/Props*', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
|
archiveArtifacts artifacts: 'Props/bin/Release/**/publish/Props*', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage("cleanup") {
|
||||||
|
steps {
|
||||||
|
dotnetClean project: 'Props/', sdk: 'Default .NET SDK'
|
||||||
|
dotnetClean project: 'Props.Tests/', sdk: 'Default .NET SDK'
|
||||||
|
dotnetClean project: 'Props.Shop/Props.Shop.sln', sdk: 'Default .NET SDK'
|
||||||
|
dotnetClean project: 'Props.Shop/Props.Shop.Tests.sln', sdk: 'Default .NET SDK'
|
||||||
|
cleanWs(patterns: [[pattern: '**/bin/**/publish', type: 'INCLUDE']])
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user