Reviewed-on: #1 Co-authored-by: Jim Nicholson <thejimnicholson@gmail.com> Co-committed-by: Jim Nicholson <thejimnicholson@gmail.com>
17 lines
353 B
Groovy
17 lines
353 B
Groovy
#!/usr/bin/env groovy
|
|
|
|
void call(Map config = [:], Closure body = { }) {
|
|
Map defaults = [
|
|
stepName: 'Checkout',
|
|
useJobSCM: true
|
|
]
|
|
runConfig = defaults + config
|
|
stage(runConfig.stepName) {
|
|
printBanner(runConfig.stepName)
|
|
if (runConfig.useJobSCM) {
|
|
checkout scm
|
|
}
|
|
body()
|
|
}
|
|
}
|