git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] ci/lib: fix "CI setup" sections with GitLab CI

From
Patrick Steinhardt <ps@pks.im>
Date
Dec 6, 2024, 11:10 UTC
Message-ID
<20241206-pks-ci-section-fixes-v1-4-7ab1b69e3648@pks.im>
In-Reply-To
<20241206-pks-ci-section-fixes-v1-0-7ab1b69e3648@pks.im>

Whenever we source "ci/lib.sh" we wrap the directives in a separate group so that they can easily be collapsed in the web UI. And as we source the script multiple times during a single CI run we thus end up with the same section name reused multiple times, as well.

This is broken on GitLab CI though, where reusing the same group name is not supported. The consequence is that only the last of these sections can be collapsed.

Fix this issue by including the name of the sourcing script in the group's name.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 ci/lib.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ci/lib.sh b/ci/lib.sh
index ba8f4da39caf29db5edaffde160bc81a7c58c329..2cdc99e7fd05650ef80715b621b42d15d6b13a12 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -55,7 +55,7 @@ group () {
 	return $res
 }
 
-begin_group "CI setup"
+begin_group "CI setup via $(basename $0)"
 
 # Set 'exit on error' for all CI scripts to let the caller know that
 # something went wrong.
@@ -393,5 +393,5 @@ esac
 
 MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
 
-end_group "CI setup"
+end_group "CI setup via $(basename $0)"
 set -x
-- 
2.47.0.366.g5daf58cba8.dirty
Previous: Patrick SteinhardtNext: karthik nayak
Message 10 of 20 in “Random improvements to GitLab CI”
  1. 0/4 Random improvements to GitLab CIPatrick Steinhardt, Dec 6, 2024
  2. 2/4 ci/lib: remove duplicate trap to end "CI setup" groupPatrick Steinhardt, Dec 6, 2024
  3. 1/4 gitlab-ci: update macOS images to SonomaPatrick Steinhardt, Dec 6, 2024
  4. karthik nayakDec 6, 2024
  5. Patrick SteinhardtDec 6, 2024
  6. karthik nayakDec 7, 2024
  7. 3/4 ci/lib: use echo instead of printf to set up sectionsPatrick Steinhardt, Dec 6, 2024
  8. Oswald BuddenhagenDec 7, 2024
  9. Patrick SteinhardtDec 10, 2024
  10. 4/4 ci/lib: fix "CI setup" sections with GitLab CIPatrick Steinhardt, Dec 6, 2024
  11. karthik nayakDec 6, 2024
  12. karthik nayakDec 6, 2024
  13. Patrick SteinhardtDec 6, 2024
  14. 0/4 Random improvements to GitLab CIPatrick Steinhardt, Dec 10, 2024
  15. 1/4 gitlab-ci: update macOS images to SonomaPatrick Steinhardt, Dec 10, 2024
  16. 2/4 ci/lib: remove duplicate trap to end "CI setup" groupPatrick Steinhardt, Dec 10, 2024
  17. 3/4 ci/lib: do not interpret escape sequences in `group ()` argumentsPatrick Steinhardt, Dec 10, 2024
  18. Toon ClaesDec 11, 2024
  19. Patrick SteinhardtDec 12, 2024
  20. 4/4 ci/lib: fix "CI setup" sections with GitLab CIPatrick Steinhardt, Dec 10, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.