]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci: pre-collapse GitLab CI sections
authorJustin Tobler <jltobler@gmail.com>
Fri, 3 May 2024 17:21:03 +0000 (12:21 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 May 2024 19:11:49 +0000 (12:11 -0700)
Sections of CI output defined by `begin_group()` and `end_group()` are
expanded in GitLab pipelines by default. This can make CI job output
rather noisy and harder to navigate. Update the behavior for GitLab
pipelines to now collapse sections by default.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/lib.sh

index 0a73fc7bd1c2036afc3b7b9df169746133a8b537..02e5e058dd16bea3e373a05fa72467c5e299021f 100755 (executable)
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -18,7 +18,7 @@ elif test true = "$GITLAB_CI"
 then
        begin_group () {
                need_to_end_group=t
-               printf "\e[0Ksection_start:$(date +%s):$(echo "$1" | tr ' ' _)\r\e[0K$1\n"
+               printf "\e[0Ksection_start:$(date +%s):$(echo "$1" | tr ' ' _)[collapsed=true]\r\e[0K$1\n"
                trap "end_group '$1'" EXIT
                set -x
        }