pipelineUtils/vars/checkoutStep.groovy
Jim Nicholson b76d3f0fc5 Revamp stages and restructure project (#1)
Reviewed-on: #1
Co-authored-by: Jim Nicholson <thejimnicholson@gmail.com>
Co-committed-by: Jim Nicholson <thejimnicholson@gmail.com>
2024-02-08 02:22:19 +00:00

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()
}
}