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 = { }) {
|
||||
Map defaults = [
|
||||
stepName: 'Checkout',
|
||||
useJobSCM: true
|
||||
useJobSCM: true,
|
||||
cleanWorkspace: true
|
||||
]
|
||||
runConfig = defaults + config
|
||||
stage(runConfig.stepName) {
|
||||
if (runConfig.cleanWorkspace) {
|
||||
cleanWs disableDeferredWipeout: true
|
||||
}
|
||||
printBanner(runConfig.stepName)
|
||||
if (runConfig.useJobSCM) {
|
||||
checkout scm
|
||||
|
||||
Loading…
Reference in New Issue
Block a user