diff --git a/vars/checkoutStep.groovy b/vars/checkoutStep.groovy index 569c87d..4c68a52 100644 --- a/vars/checkoutStep.groovy +++ b/vars/checkoutStep.groovy @@ -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