summaryrefslogtreecommitdiff
path: root/ci/print-test-failures.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-11-09 08:05:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-11-09 09:56:10 (GMT)
commit0e3b67e2aa25edb7e1a5c999c87b52a7b3a7649a (patch)
tree4ef6d5461f199c7557a9f7043f1ec2000f3f27df /ci/print-test-failures.sh
parent0d3911ad73514850a79af478d62a94c754892d12 (diff)
downloadgit-0e3b67e2aa25edb7e1a5c999c87b52a7b3a7649a.zip
git-0e3b67e2aa25edb7e1a5c999c87b52a7b3a7649a.tar.gz
git-0e3b67e2aa25edb7e1a5c999c87b52a7b3a7649a.tar.bz2
ci: add support for GitLab CI
We already support Azure Pipelines and GitHub Workflows in the Git project, but until now we do not have support for GitLab CI. While it is arguably not in the interest of the Git project to maintain a ton of different CI platforms, GitLab has recently ramped up its efforts and tries to contribute to the Git project more regularly. Part of a problem we hit at GitLab rather frequently is that our own, custom CI setup we have is so different to the setup that the Git project has. More esoteric jobs like "linux-TEST-vars" that also set a couple of environment variables do not exist in GitLab's custom CI setup, and maintaining them to keep up with what Git does feels like wasted time. The result is that we regularly send patch series upstream that fail to compile or pass tests in GitHub Workflows. We would thus like to integrate the GitLab CI configuration into the Git project to help us send better patch series upstream and thus reduce overhead for the maintainer. Results of these pipeline runs will be made available (at least) in GitLab's mirror of the Git project at [1]. This commit introduces the integration into our regular CI scripts so that most of the setup continues to be shared across all of the CI solutions. Note that as the builds on GitLab CI run as unprivileged user, we need to pull in both sudo and shadow packages to our Alpine based job to set this up. [1]: https://gitlab.com/gitlab-org/git Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ci/print-test-failures.sh')
-rwxr-xr-xci/print-test-failures.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh
index 57277ee..c33ad4e 100755
--- a/ci/print-test-failures.sh
+++ b/ci/print-test-failures.sh
@@ -51,6 +51,12 @@ do
tar czf failed-test-artifacts/"$test_name".trash.tar.gz "$trash_dir"
continue
;;
+ gitlab-ci)
+ mkdir -p failed-test-artifacts
+ cp "${TEST_EXIT%.exit}.out" failed-test-artifacts/
+ tar czf failed-test-artifacts/"$test_name".trash.tar.gz "$trash_dir"
+ continue
+ ;;
*)
echo "Unhandled CI type: $CI_TYPE" >&2
exit 1