pipelineUtils/vars/printBanner.groovy
2024-02-07 14:52:33 -08:00

17 lines
543 B
Groovy

void call(String stepName) {
stepCorner = '+'
stepBanner = "║ $stepName ║"
bannerWidth = stepBanner.length() - 2
// banner = stepCorner + ('=' * bannerWidth) + stepCorner
top = '╔' + ('═' * bannerWidth) + '╗'
bottom = '╚' + ('═' * bannerWidth) + '╝'
red = '\\e[31m'
normal = '\\e[0m'
ansiColor('xterm') {
echo "$red$top\n$stepBanner\n$bottom$normal"
}
}
// ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬