Sync with 2.43.4
[git/gitster.git] / ci / run-docker.sh
blobaf89d1624a41cbe3e51e6c10d65f72082266c490
1 #!/bin/sh
3 # Download and run Docker image to build and test Git
6 . ${0%/*}/lib.sh
8 case "$jobname" in
9 linux32)
10 CI_CONTAINER="daald/ubuntu32:xenial"
12 linux-musl)
13 CI_CONTAINER=alpine
16 exit 1
18 esac
20 docker pull "$CI_CONTAINER"
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>
28 container_cache_dir=/tmp/container-cache
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)
45 check_unignored_build_artifacts
47 save_good_tree