From ca8a041cf6fa9748e2420893fef2c89ff13250fb Mon Sep 17 00:00:00 2001 From: Eric Stroczynski Date: Thu, 19 Sep 2019 15:36:44 -0700 Subject: [PATCH] tests/integration/dockerfiles: move all integration dockerfiles here, create base image --- README.md | 7 ++++--- integration.Dockerfile | 6 ------ tests/integration/dockerfiles/integration-base.Dockerfile | 8 ++++++++ tests/integration/dockerfiles/integration.Dockerfile | 5 +++++ 4 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 integration.Dockerfile create mode 100644 tests/integration/dockerfiles/integration-base.Dockerfile create mode 100644 tests/integration/dockerfiles/integration.Dockerfile diff --git a/README.md b/README.md index 262a3f5..9b5465d 100644 --- a/README.md +++ b/README.md @@ -123,13 +123,14 @@ and run flake8 for code linting. Before running integration tests, you must have write access credentials to a [quay.io](https://quay.io) namespace. See the [authentication](#authentication) section for more information. -First, build the integration docker image: +First, build the integration docker images: ```sh -$ docker build -f integration.Dockerfile -t operator-courier-integration . +$ docker build -f tests/integration/dockerfiles/integration-base.Dockerfile -t operator-courier-integration-base:latest . +$ docker build -f tests/integration/dockerfiles/integration.Dockerfile -t operator-courier-integration:latest . ``` -Then run the tests inside a container: +Then run the tests inside a container using your access credentials: ```sh $ docker run \ diff --git a/integration.Dockerfile b/integration.Dockerfile deleted file mode 100644 index 4563ee4..0000000 --- a/integration.Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM operator-courier-base:latest - -RUN pip3 install tox coveralls - -WORKDIR /src -COPY . . diff --git a/tests/integration/dockerfiles/integration-base.Dockerfile b/tests/integration/dockerfiles/integration-base.Dockerfile new file mode 100644 index 0000000..80c9d1f --- /dev/null +++ b/tests/integration/dockerfiles/integration-base.Dockerfile @@ -0,0 +1,8 @@ +FROM fedora:29 + +RUN dnf install -y --setopt=install_weak_deps=False --best \ + git \ + python3-tox \ + python3-coveralls \ + && dnf -y clean all \ + && rm -rf /tmp/* diff --git a/tests/integration/dockerfiles/integration.Dockerfile b/tests/integration/dockerfiles/integration.Dockerfile new file mode 100644 index 0000000..5e4fb85 --- /dev/null +++ b/tests/integration/dockerfiles/integration.Dockerfile @@ -0,0 +1,5 @@ +FROM operator-courier-integration-base:latest + +WORKDIR /operator-courier +COPY . . +RUN pip3 install .