git/ci
Patrick Steinhardt 11d3f1aa5f ci: skip sudo when we are already root
Our "install-dependencies.sh" script is executed by non-dockerized jobs
to install dependencies. These jobs don't run with "root" permissions,
but with a separate user. Consequently, we need to use sudo(8) there to
elevate permissions when installing packages.

We're about to merge "install-docker-dependencies.sh" into that script
though, and our Docker containers do run as "root". Using sudo(8) is
thus unnecessary there, even though it would be harmless. On some images
like Alpine Linux though there is no sudo(8) available by default, which
would consequently break the build.

Adapt the script to make "sudo" a no-op when running as "root" user.
This allows us to easily reuse the script for our dockerized jobs.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-12 08:47:50 -07:00
..
config ci: deprecate ci/config/allow-ref script 2023-08-30 15:56:11 -07:00
util
check-directional-formatting.bash
install-dependencies.sh ci: skip sudo when we are already root 2024-04-12 08:47:50 -07:00
install-docker-dependencies.sh ci: add job performing static analysis on GitLab CI 2024-01-08 11:23:03 -08:00
lib.sh ci: rename "runs_on_pool" to "distro" 2024-04-12 08:47:49 -07:00
make-test-artifacts.sh ci(github): use grouping also in the `win-build` job 2022-06-13 09:58:41 -07:00
mount-fileshare.sh
print-test-failures.sh ci: handle TEST_OUTPUT_DIRECTORY when printing test failures 2024-01-18 11:53:17 -08:00
run-build-and-minimal-fuzzers.sh fuzz: add fuzzer for config parsing 2024-03-15 10:47:05 -07:00
run-build-and-tests.sh ci: add jobs to test with the reftable backend 2024-02-07 08:28:37 -08:00
run-docker-build.sh CI: rename the "Linux32" job to lower-case "linux32" 2021-11-23 16:51:53 -08:00
run-docker.sh CI: rename the "Linux32" job to lower-case "linux32" 2021-11-23 16:51:53 -08:00
run-static-analysis.sh i18n CI: stop allowing non-ASCII source messages in po/git.pot 2022-05-26 10:30:28 -07:00
run-test-slice.sh ci: run unit tests in CI 2023-11-10 08:15:32 +09:00
test-documentation.sh