]> git.ipfire.org Git - thirdparty/git.git/commit
ci: handle Windows-based CI jobs in GitLab CI
authorPatrick Steinhardt <ps@pks.im>
Wed, 9 Oct 2024 13:25:23 +0000 (15:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Oct 2024 18:33:04 +0000 (11:33 -0700)
commitb7a08e947eb42de6f272d60b68a2e30790e7c0d5
tree61c2cbd17c62b4633ce9970c76f871d6e915ca8b
parent91839a882779012a2bc18c1bfd1d8d11fe1099aa
ci: handle Windows-based CI jobs in GitLab CI

We try to abstract away any differences between different CI platforms
in "ci/lib.sh", such that knowledge specific to e.g. GitHub Actions or
GitLab CI is neatly encapsulated in a single place. Next to some generic
variables, we also set up some variables that are specific to the actual
platform that the CI operates on, e.g. Linux or macOS.

We do not yet support Windows runners on GitLab CI. Unfortunately, those
systems do not use the same "CI_JOB_IMAGE" environment variable as both
Linux and macOS do. Instead, we can use the "OS" variable, which should
have a value of "Windows_NT" on Windows platforms.

Handle the combination of "$OS,$CI_JOB_IMAGE" and introduce support for
Windows.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/lib.sh