]> git.ipfire.org Git - thirdparty/git.git/blob - ci/run-docker.sh
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / ci / run-docker.sh
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/travis-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