2023-01-25 17:35:53 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-12-05 17:41:23 +00:00
|
|
|
|
|
|
|
# usage: $0 <start|end> <section_identifier+config> "<human section name>"
|
|
|
|
# eg: $0 start 'my_section[collapsed=true]' "My collapsed section"
|
|
|
|
#
|
|
|
|
# See also: https://docs.gitlab.com/ee/ci/jobs/#custom-collapsible-sections
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
if [ "$1" = start ]; then
|
|
|
|
echo -e "\e[0Ksection_start:$(date +%s):$2\r\e[0K$3"
|
|
|
|
else
|
|
|
|
echo -e "\e[0Ksection_end:$(date +%s):$2\r\e[0K"
|
|
|
|
fi
|