Revamp stages and restructure project #1
@ -9,7 +9,7 @@ void call(Map config = [:], Closure body) {
|
||||
]
|
||||
Map runConfig = defaults + config
|
||||
stage(runConfig.stepName) {
|
||||
echo "${runConfig.stepName}"
|
||||
printBanner(runConfig.stepName)
|
||||
if (runConfig.saveArtifacts) {
|
||||
assert runConfig.artifacts : 'Error: saveArtifacts is set to true; must specify artifacts!'
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ void call(Map config = [:], Closure body) {
|
||||
echo 'Firing ...'
|
||||
runConfig = defaults + config
|
||||
stage(runConfig.stepName) {
|
||||
printBanner(runConfig.stepName)
|
||||
if (runConfig.useJobSCM) {
|
||||
checkout scm
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
void printBanner(String anything) {
|
||||
repetitions = anything.length() + 2
|
||||
boxTop = "+${'='.repeat(repetitions)}+"
|
||||
boxTop = "+${'=' * repetitions}+"
|
||||
echo "${boxTop}\n| ${anything} |\n${boxTop}\n"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user