Revamp stages and restructure project #1

Merged
jim merged 32 commits from newstage into master 2024-02-08 02:22:21 +00:00
3 changed files with 3 additions and 2 deletions
Showing only changes of commit ddd61cc25a - Show all commits

View File

@ -9,7 +9,7 @@ void call(Map config = [:], Closure body) {
] ]
Map runConfig = defaults + config Map runConfig = defaults + config
stage(runConfig.stepName) { stage(runConfig.stepName) {
echo "${runConfig.stepName}" printBanner(runConfig.stepName)
if (runConfig.saveArtifacts) { if (runConfig.saveArtifacts) {
assert runConfig.artifacts : 'Error: saveArtifacts is set to true; must specify artifacts!' assert runConfig.artifacts : 'Error: saveArtifacts is set to true; must specify artifacts!'
} }

View File

@ -8,6 +8,7 @@ void call(Map config = [:], Closure body) {
echo 'Firing ...' echo 'Firing ...'
runConfig = defaults + config runConfig = defaults + config
stage(runConfig.stepName) { stage(runConfig.stepName) {
printBanner(runConfig.stepName)
if (runConfig.useJobSCM) { if (runConfig.useJobSCM) {
checkout scm checkout scm
} }

View File

@ -1,5 +1,5 @@
void printBanner(String anything) { void printBanner(String anything) {
repetitions = anything.length() + 2 repetitions = anything.length() + 2
boxTop = "+${'='.repeat(repetitions)}+" boxTop = "+${'=' * repetitions}+"
echo "${boxTop}\n| ${anything} |\n${boxTop}\n" echo "${boxTop}\n| ${anything} |\n${boxTop}\n"
} }