diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f17cd1c..17340e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,20 +1,54 @@ +.build_docker: + + image: 'docker:19.03.11' + services: + - docker:19.03.11-dind + variables: + # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled + DOCKER_HOST: tcp://docker:2376 + DOCKER_TLS_CERTDIR: "/certs" + stage: .pre + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + script: + - echo ${DOCKERFILE} + - cd ${DOCKERFILE} + - docker build -t ${DOCKERREPO} . + - docker push ${DOCKERREPO} + + when: manual + + +docker build:debian_bullseye: + extends: .build_docker + variables: + DOCKERFILE: dockerfiles/debian:bullseye/ + DOCKERREPO: registry.gitlab.com/ganciaux/slides:debian_bullseye + +docker build:ubuntu_20_04: + extends: .build_docker + variables: + DOCKERFILE: dockerfiles/ubuntu:20.04/ + DOCKERREPO: registry.gitlab.com/ganciaux/slides:ubuntu_20_04 + + .tests: stage: test script: - python3 setup.py install - cd tests - pytest --junitxml=report.xml artifacts: reports: junit: tests/report.xml -test:ubuntu_18_04: - image: registry.gitlab.com/ganciaux/slides:ubuntu_18_04 - extends: - - .tests +# test:ubuntu_20_04: +# image: registry.gitlab.com/ganciaux/slides:ubuntu_20_04 +# extends: +# - .tests -test:ubuntu_19_10: - image: registry.gitlab.com/ganciaux/slides:ubuntu_19_10 +test:debian_bullseye: + image: registry.gitlab.com/ganciaux/slides:debian_bullseye extends: - .tests diff --git a/dockerfiles/ubuntu:18.04/Dockerfile b/dockerfiles/debian:bullseye/Dockerfile similarity index 96% rename from dockerfiles/ubuntu:18.04/Dockerfile rename to dockerfiles/debian:bullseye/Dockerfile index 87b1891..e702462 100644 --- a/dockerfiles/ubuntu:18.04/Dockerfile +++ b/dockerfiles/debian:bullseye/Dockerfile @@ -1,18 +1,18 @@ -FROM ubuntu:18.04 +FROM debian:bullseye MAINTAINER Guillaume Anciaux ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 ## for apt to be noninteractive ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN true # minimal dependencies RUN apt-get -qq update && apt-get install -y python3-pip texlive-latex-extra clang-format libmagickwand-dev dvipng && rm -rf /var/lib/apt/lists/* RUN pip3 install jupyter sympy pypdf2 matplotlib wand dill jupyter_contrib_nbextensions pyparsing>=2.3.0 # for testing RUN apt-get -qq update && apt-get install -y python3-pep8 && rm -rf /var/lib/apt/lists/* RUN pip3 install pytest diff --git a/dockerfiles/ubuntu:19.10/Dockerfile b/dockerfiles/ubuntu:20.04/Dockerfile similarity index 59% rename from dockerfiles/ubuntu:19.10/Dockerfile rename to dockerfiles/ubuntu:20.04/Dockerfile index 67f629b..bba54a5 100644 --- a/dockerfiles/ubuntu:19.10/Dockerfile +++ b/dockerfiles/ubuntu:20.04/Dockerfile @@ -1,18 +1,18 @@ -FROM ubuntu:19.10 +FROM ubuntu:20.04 MAINTAINER Guillaume Anciaux ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 ## for apt to be noninteractive ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN true # minimal dependencies -RUN apt-get -qq update && apt-get install -y python3-pip texlive-latex-extra clang-format libmagickwand-dev dvipng && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt install -y python3-pip texlive-latex-extra clang-format libmagickwand-dev dvipng && rm -rf /var/lib/apt/lists/* RUN pip3 install jupyter sympy pypdf2 matplotlib wand dill jupyter_contrib_nbextensions pyparsing>=2.3.0 # for testing -RUN apt-get -qq update && apt-get install -y python3-pep8 && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y python3-pep8 && rm -rf /var/lib/apt/lists/* RUN pip3 install pytest