Subject: [PATCH v6 0/8] ci: add GitLab CI definition

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 9 Nov 2023 09:05:21 +0100

Hi,

this is the 6th version of my patch series to introduce support for
GitLab CI into the Git project.

There's only a single change compared to v5 based on Chris' feedback,
namely to move around a `return 1`. The newly extracted helper function
`create_failed_test_artifacts()` indeed wasn't the correct place to put
this error code.

A test run of this pipeline can be found at [1].

Thanks!

Patrick

[1]: https://gitlab.com/gitlab-org/git/-/pipelines/1066250852

Patrick Steinhardt (8):
  ci: reorder definitions for grouping functions
  ci: make grouping setup more generic
  ci: group installation of Docker dependencies
  ci: split out logic to set up failed test artifacts
  ci: unify setup of some environment variables
  ci: squelch warnings when testing with unusable Git repo
  ci: install test dependencies for linux-musl
  ci: add support for GitLab CI

 .gitlab-ci.yml                    |  53 +++++++++
 ci/install-docker-dependencies.sh |  23 +++-
 ci/lib.sh                         | 190 ++++++++++++++++++++++--------
 ci/print-test-failures.sh         |   6 +
 t/lib-httpd.sh                    |  17 ++-
 5 files changed, 234 insertions(+), 55 deletions(-)
 create mode 100644 .gitlab-ci.yml

Range-diff against v5:
1:  0ba396f2a33 = 1:  a1413b76422 ci: reorder definitions for grouping functions
2:  821cfcd6125 = 2:  29039d7aa3a ci: make grouping setup more generic
3:  6e5bcf143c8 = 3:  414655ffb2d ci: group installation of Docker dependencies
4:  2182acf5bfc ! 4:  96d710faec8 ci: split out logic to set up failed test artifacts
    @@ ci/lib.sh: handle_failed_tests () {
     +		cp "t/test-results/$test_name.out" t/failed-test-artifacts/
     +		tar czf t/failed-test-artifacts/"$test_name".trash.tar.gz "$trash_dir"
     +	done
    -+	return 1
     +}
     +
      # GitHub Action doesn't set TERM, which is required by tput
    @@ ci/lib.sh: then
     -			cp "t/test-results/$test_name.out" t/failed-test-artifacts/
     -			tar czf t/failed-test-artifacts/"$test_name".trash.tar.gz "$trash_dir"
     -		done
    --		return 1
     +		create_failed_test_artifacts
    + 		return 1
      	}
      
    - 	cache_dir="$HOME/none"
5:  6078aea246d = 5:  486d4bbf8b0 ci: unify setup of some environment variables
6:  d69bde92f2f = 6:  534b14f0262 ci: squelch warnings when testing with unusable Git repo
7:  b911c005bae = 7:  a060613f039 ci: install test dependencies for linux-musl
8:  5784d03a6f1 ! 8:  c05ff28cc2c ci: add support for GitLab CI
    @@ ci/lib.sh: then
     +	DONT_SKIP_TAGS=t
     +	handle_failed_tests () {
     +		create_failed_test_artifacts
    ++		return 1
     +	}
     +
     +	cache_dir="$HOME/none"

base-commit: dadef801b365989099a9929e995589e455c51fed
-- 
2.42.0