From e8e682a70edc5597a290a121f5a5a5a277f9cf8e Mon Sep 17 00:00:00 2001 From: Jonathan Dieter Date: Tue, 17 Jul 2018 15:49:14 +0100 Subject: [PATCH] Add testing Dockerfiles for automated testing Signed-off-by: Jonathan Dieter --- DOCKER_TESTING.md | 10 ++++++++++ autotest/centos-latest/Dockerfile | 9 +++++++++ autotest/centos-latest/docker-compose.yml | 6 ++++++ autotest/debian-latest/Dockerfile | 8 ++++++++ autotest/debian-latest/docker-compose.yml | 6 ++++++ autotest/fedora-latest/Dockerfile | 7 +++++++ autotest/fedora-latest/docker-compose.yml | 6 ++++++ autotest/opensuse-leap/Dockerfile | 7 +++++++ autotest/opensuse-leap/docker-compose.yml | 6 ++++++ autotest/ubuntu-rolling/Dockerfile | 8 ++++++++ autotest/ubuntu-rolling/docker-compose.yml | 6 ++++++ 11 files changed, 79 insertions(+) create mode 100644 DOCKER_TESTING.md create mode 100644 autotest/centos-latest/Dockerfile create mode 100644 autotest/centos-latest/docker-compose.yml create mode 100644 autotest/debian-latest/Dockerfile create mode 100644 autotest/debian-latest/docker-compose.yml create mode 100644 autotest/fedora-latest/Dockerfile create mode 100644 autotest/fedora-latest/docker-compose.yml create mode 100644 autotest/opensuse-leap/Dockerfile create mode 100644 autotest/opensuse-leap/docker-compose.yml create mode 100644 autotest/ubuntu-rolling/Dockerfile create mode 100644 autotest/ubuntu-rolling/docker-compose.yml diff --git a/DOCKER_TESTING.md b/DOCKER_TESTING.md new file mode 100644 index 0000000..ec2a6a4 --- /dev/null +++ b/DOCKER_TESTING.md @@ -0,0 +1,10 @@ +Dockerfiles are available to test the latest build on different platforms: + + * fedora:latest - autotest/fedora-latest + * centos:latest - autotest/centos-latest + * ubuntu:rolling - autotest/ubuntu-rolling + * opensuse/leap - autotest/opensuse-leap + * debian:latest - autotest/debian-latest + +To test, in the project root directory, run:
+```docker-compose --file autotest//docker-compose.yml build``` \ No newline at end of file diff --git a/autotest/centos-latest/Dockerfile b/autotest/centos-latest/Dockerfile new file mode 100644 index 0000000..16ce7d0 --- /dev/null +++ b/autotest/centos-latest/Dockerfile @@ -0,0 +1,9 @@ +FROM centos:latest +ADD ./ /code +WORKDIR /code +RUN yum -y install epel-release +RUN yum -y update epel-release +RUN yum -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" +RUN meson build +RUN /bin/bash -c 'cd build; ninja-build' +RUN /bin/bash -c 'cd build; ninja-build test' diff --git a/autotest/centos-latest/docker-compose.yml b/autotest/centos-latest/docker-compose.yml new file mode 100644 index 0000000..712ca1d --- /dev/null +++ b/autotest/centos-latest/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + test: + build: + context: ../../ + dockerfile: ./autotest/centos-latest/Dockerfile diff --git a/autotest/debian-latest/Dockerfile b/autotest/debian-latest/Dockerfile new file mode 100644 index 0000000..350d349 --- /dev/null +++ b/autotest/debian-latest/Dockerfile @@ -0,0 +1,8 @@ +FROM debian:latest +ADD ./ /code +WORKDIR /code +RUN apt-get update +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -yq install meson gcc pkg-config libzstd-dev libcurl4-openssl-dev libssl-dev' +RUN meson build +RUN /bin/bash -c 'cd build; ninja' +RUN /bin/bash -c 'cd build; ninja test' diff --git a/autotest/debian-latest/docker-compose.yml b/autotest/debian-latest/docker-compose.yml new file mode 100644 index 0000000..d43de16 --- /dev/null +++ b/autotest/debian-latest/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + test: + build: + context: ../../ + dockerfile: ./autotest/debian-latest/Dockerfile diff --git a/autotest/fedora-latest/Dockerfile b/autotest/fedora-latest/Dockerfile new file mode 100644 index 0000000..c81680c --- /dev/null +++ b/autotest/fedora-latest/Dockerfile @@ -0,0 +1,7 @@ +FROM fedora:latest +ADD ./ /code +WORKDIR /code +RUN dnf -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" +RUN meson build +RUN /bin/bash -c 'cd build; ninja' +RUN /bin/bash -c 'cd build; ninja test' diff --git a/autotest/fedora-latest/docker-compose.yml b/autotest/fedora-latest/docker-compose.yml new file mode 100644 index 0000000..7069e3d --- /dev/null +++ b/autotest/fedora-latest/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + test: + build: + context: ../../ + dockerfile: ./autotest/fedora-latest/Dockerfile diff --git a/autotest/opensuse-leap/Dockerfile b/autotest/opensuse-leap/Dockerfile new file mode 100644 index 0000000..ea6d3f0 --- /dev/null +++ b/autotest/opensuse-leap/Dockerfile @@ -0,0 +1,7 @@ +FROM opensuse/leap +ADD ./ /code +WORKDIR /code +RUN zypper --non-interactive install meson gcc pkgconfig "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" +RUN meson build +RUN /bin/bash -c 'cd build; ninja' +RUN /bin/bash -c 'cd build; ninja test' diff --git a/autotest/opensuse-leap/docker-compose.yml b/autotest/opensuse-leap/docker-compose.yml new file mode 100644 index 0000000..f305465 --- /dev/null +++ b/autotest/opensuse-leap/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + test: + build: + context: ../../ + dockerfile: ./autotest/opensuse-leap/Dockerfile diff --git a/autotest/ubuntu-rolling/Dockerfile b/autotest/ubuntu-rolling/Dockerfile new file mode 100644 index 0000000..4b62c58 --- /dev/null +++ b/autotest/ubuntu-rolling/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:rolling +ADD ./ /code +WORKDIR /code +RUN apt-get update +RUN /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -yq install meson gcc pkg-config libzstd-dev libcurl4-openssl-dev libssl-dev' +RUN meson build +RUN /bin/bash -c 'cd build; ninja' +RUN /bin/bash -c 'cd build; ninja test' diff --git a/autotest/ubuntu-rolling/docker-compose.yml b/autotest/ubuntu-rolling/docker-compose.yml new file mode 100644 index 0000000..a35dd2d --- /dev/null +++ b/autotest/ubuntu-rolling/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + test: + build: + context: ../../ + dockerfile: ./autotest/ubuntu-rolling/Dockerfile -- 2.30.2