]> git.ipfire.org Git - thirdparty/git.git/blame - ci/run-docker.sh
Merge branch 'ps/ref-transaction-hook'
[thirdparty/git.git] / ci / run-docker.sh
CommitLineData
657343a6
LS
1#!/bin/sh
2#
5a33f541 3# Download and run Docker image to build and test Git
657343a6
LS
4#
5
c2160f2d 6. ${0%/*}/lib.sh
657343a6 7
5a33f541
ĐTCD
8case "$jobname" in
9Linux32)
10 CI_CONTAINER="daald/ubuntu32:xenial"
11 ;;
e0f8690d
ĐTCD
12linux-musl)
13 CI_CONTAINER=alpine
14 ;;
5a33f541
ĐTCD
15*)
16 exit 1
17 ;;
18esac
19
20docker pull "$CI_CONTAINER"
657343a6
LS
21
22# Use the following command to debug the docker build locally:
5a33f541
ĐTCD
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"
2bd1e2d2 25# root@container:/# export jobname=<jobname>
5a33f541 26# root@container:/# /usr/src/git/ci/run-docker-build.sh <host-user-id>
657343a6 27
b2cbaa09
SG
28container_cache_dir=/tmp/travis-cache
29
657343a6
LS
30docker 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 \
d2fae19e 37 --env MAKEFLAGS \
2bd1e2d2 38 --env jobname \
b2cbaa09 39 --env cache_dir="$container_cache_dir" \
657343a6 40 --volume "${PWD}:/usr/src/git" \
b2cbaa09 41 --volume "$cache_dir:$container_cache_dir" \
5a33f541
ĐTCD
42 "$CI_CONTAINER" \
43 /usr/src/git/ci/run-docker-build.sh $(id -u $USER)
9cc2c76f 44
b92cb86e
SG
45check_unignored_build_artifacts
46
9cc2c76f 47save_good_tree