From 607fe5c1f2058c542e2cf32e8fc0d0ced8e03ee3 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Mon, 13 Jul 2020 14:04:50 +0200 Subject: [PATCH] WIP: pipeline --- .docker/Dockerfile | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 3ab2375..174d42e 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,20 +1,32 @@ FROM debian:latest RUN apt-get update && \ - apt-get install \ - curl \ - git \ - openjdk-11-jdk-headless \ - python-autopep8 \ - python3-pip \ - tox \ - -y + apt-get install \ + curl \ + git \ + openjdk-11-jdk-headless \ + python-autopep8 \ + python3-pip \ + tox \ + -y COPY .docker/wait-for-it.sh /wait-for-it.sh ARG PYLIB=dev ADD https://gitlab.com/api/v4/projects/13656973/repository/commits/${PYLIB} \ - pylib_version.json + pylib_version.json RUN git clone https://gitlab.com/caosdb/caosdb-pylib.git && \ - cd caosdb-pylib && git checkout ${PYLIB} && pip3 install . + cd caosdb-pylib && git checkout ${PYLIB} && pip3 install . COPY . /git -RUN rm -r /git/.git && mv /git/.docker/pycaosdb.ini /git + +# Delete .git because it is huge. +RUN rm -r /git/.git + +# Install pycaosdb.ini for the tests +RUN mv /git/.docker/tester_pycaosdb.ini /git/pycaosdb.ini + + WORKDIR /git -CMD /wait-for-it.sh caosdb-server:10443 -t 500 -- tox +# wait for server, +CMD /wait-for-it.sh caosdb-server:10443 -t 500 -- \ + # ... install pycaosdb.ini the server-side scripts + cp /git/.docker/sss_pycaosdb.ini /scripting/home/.pycaosdb.ini && \ + # ... and run tests + tox -- GitLab