Marc Kupietz | 485be1c | 2022-04-10 14:21:45 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Reference: https://docs.gitlab.com/ee/ci/jobs/#custom-collapsible-sections |
| 4 | |
| 5 | # |
| 6 | # Takes 2 Parameters a new section id and a heading/title |
| 7 | # |
| 8 | function start_section() { |
| 9 | id=$1 |
| 10 | title=$2 |
| 11 | echo -e "\e[0Ksection_start:$(date +%s):${id}[collapsed=true]\r\e[0K\e[36;1m${title}\e[0m" |
| 12 | } |
| 13 | |
| 14 | # |
| 15 | # Takes 1 Parameter, the unique section id of the section that should end |
| 16 | # |
| 17 | function end_section() { |
| 18 | id=$1 |
| 19 | echo -e "\e[0Ksection_end:$(date +%s):${id}\r\e[0K" |
| 20 | } |