diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfile index d51cc399..ac84c795 100644 --- a/docker/ci/Dockerfile +++ b/docker/ci/Dockerfile @@ -1,7 +1,10 @@ FROM quay.io/podman/stable RUN dnf -y install git openssl COPY init.sh /init.sh +ENV GIT_REF=master +ENV GIT_REMOTE=https://git.kolab.org/source/kolab.git + CMD [ "/init.sh" ] diff --git a/docker/ci/init.sh b/docker/ci/init.sh index 0c2f1f0d..f3098fb7 100755 --- a/docker/ci/init.sh +++ b/docker/ci/init.sh @@ -1,5 +1,14 @@ #!/bin/bash set -e -git clone https://git.kolab.org/source/kolab.git +function checkout() { + if [ ! -d "$1" ]; then + git clone "$2" "$1" + pushd "$1" + git checkout "$3" + popd + fi +} + +checkout kolab $GIT_REMOTE $GIT_REF pushd kolab ci/testctl testrun