18 lines
377 B
Groovy
18 lines
377 B
Groovy
#!/usr/bin/env groovy
|
|
|
|
void call(Map config = [:], Closure body) {
|
|
Map defaults = [
|
|
stepName: 'Checkout',
|
|
useJobSCM: true
|
|
]
|
|
echo 'Firing ...'
|
|
runConfig = defaults + config
|
|
stage(runConfig.stepName) {
|
|
echo makeStepBanner(runConfig.stepName)
|
|
if (runConfig.useJobSCM) {
|
|
checkout scm
|
|
}
|
|
body()
|
|
}
|
|
}
|