ci: drop run-docker scripts

We haven't used these scripts since 4a6e4b9602 (CI: remove Travis CI support, 2021-11-23), as the GitHub Actions config has support for directly running jobs within docker containers. It's possible we might want to resurrect something like this in order to be more agnostic to the CI platform. But it's not clear exactly what it would look like. And in the meantime, it's just a maintenance burden as we make changes to CI config, and is subject to bitrot. In fact it's already broken; it references ci/install-docker-dependencies.sh, which went away in 9cdeb34b96 (ci: merge scripts which install dependencies, 2024-04-12). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Sep 12, 2024 at 05:43 UTC 48c55943c5c7d1ab35fe8af62f656f8e40fe18e5
2 files changed -113
ci/run-docker-build.sh deleted
-66
@@ -1,66 +0,0 @@
1 -#!/bin/sh
2 -#
3 -# Build and test Git inside container
4 -#
5 -# Usage:
6 -# run-docker-build.sh <host-user-id>
7 -#
8 -
9 -set -ex
10 -
11 -if test $# -ne 1 || test -z "$1"
12 -then
13 - echo >&2 "usage: run-docker-build.sh <host-user-id>"
14 - exit 1
15 -fi
16 -
17 -case "$jobname" in
18 -linux32)
19 - switch_cmd="linux32 --32bit i386"
20 - ;;
21 -linux-musl)
22 - switch_cmd=
23 - useradd () { adduser -D "$@"; }
24 - ;;
25 -*)
26 - exit 1
27 - ;;
28 -esac
29 -
30 -"${0%/*}/install-docker-dependencies.sh"
31 -
32 -# If this script runs inside a docker container, then all commands are
33 -# usually executed as root. Consequently, the host user might not be
34 -# able to access the test output files.
35 -# If a non 0 host user id is given, then create a user "ci" with that
36 -# user id to make everything accessible to the host user.
37 -HOST_UID=$1
38 -if test $HOST_UID -eq 0
39 -then
40 - # Just in case someone does want to run the test suite as root.
41 - CI_USER=root
42 -else
43 - CI_USER=ci
44 - if test "$(id -u $CI_USER 2>/dev/null)" = $HOST_UID
45 - then
46 - echo "user '$CI_USER' already exists with the requested ID $HOST_UID"
47 - else
48 - useradd -u $HOST_UID $CI_USER
49 - fi
50 -fi
51 -
52 -# Build and test
53 -command $switch_cmd su -m -l $CI_USER -c "
54 - set -ex
55 - export DEVELOPER='$DEVELOPER'
56 - export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'
57 - export GIT_PROVE_OPTS='$GIT_PROVE_OPTS'
58 - export GIT_TEST_OPTS='$GIT_TEST_OPTS'
59 - export GIT_TEST_CLONE_2GB='$GIT_TEST_CLONE_2GB'
60 - export MAKEFLAGS='$MAKEFLAGS'
61 - export cache_dir='$cache_dir'
62 - cd /usr/src/git
63 - test -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove
64 - make
65 - make test
66 -"
ci/run-docker.sh deleted
-47
@@ -1,47 +0,0 @@
1 -#!/bin/sh
2 -#
3 -# Download and run Docker image to build and test Git
4 -#
5 -
6 -. ${0%/*}/lib.sh
7 -
8 -case "$jobname" in
9 -linux32)
10 - CI_CONTAINER="daald/ubuntu32:xenial"
11 - ;;
12 -linux-musl)
13 - CI_CONTAINER=alpine
14 - ;;
15 -*)
16 - exit 1
17 - ;;
18 -esac
19 -
20 -docker pull "$CI_CONTAINER"
21 -
22 -# Use the following command to debug the docker build locally:
23 -# <host-user-id> must be 0 if podman is used as drop-in replacement for docker
24 -# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/sh "$CI_CONTAINER"
25 -# root@container:/# export jobname=<jobname>
26 -# root@container:/# /usr/src/git/ci/run-docker-build.sh <host-user-id>
27 -
28 -container_cache_dir=/tmp/container-cache
29 -
30 -docker run \
31 - --interactive \
32 - --env DEVELOPER \
33 - --env DEFAULT_TEST_TARGET \
34 - --env GIT_PROVE_OPTS \
35 - --env GIT_TEST_OPTS \
36 - --env GIT_TEST_CLONE_2GB \
37 - --env MAKEFLAGS \
38 - --env jobname \
39 - --env cache_dir="$container_cache_dir" \
40 - --volume "${PWD}:/usr/src/git" \
41 - --volume "$cache_dir:$container_cache_dir" \
42 - "$CI_CONTAINER" \
43 - /usr/src/git/ci/run-docker-build.sh $(id -u $USER)
44 -
45 -check_unignored_build_artifacts
46 -
47 -save_good_tree