Add option to clean workspace, default to yes
This commit is contained in:
parent
29648d6ad4
commit
9bea81a288
@ -3,10 +3,14 @@
|
|||||||
void call(Map config = [:], Closure body = { }) {
|
void call(Map config = [:], Closure body = { }) {
|
||||||
Map defaults = [
|
Map defaults = [
|
||||||
stepName: 'Checkout',
|
stepName: 'Checkout',
|
||||||
useJobSCM: true
|
useJobSCM: true,
|
||||||
|
cleanWorkspace: true
|
||||||
]
|
]
|
||||||
runConfig = defaults + config
|
runConfig = defaults + config
|
||||||
stage(runConfig.stepName) {
|
stage(runConfig.stepName) {
|
||||||
|
if (runConfig.cleanWorkspace) {
|
||||||
|
cleanWs disableDeferredWipeout: true
|
||||||
|
}
|
||||||
printBanner(runConfig.stepName)
|
printBanner(runConfig.stepName)
|
||||||
if (runConfig.useJobSCM) {
|
if (runConfig.useJobSCM) {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user