From bec68c22cce3e8677d74085acbc8fa5b68c08266 Mon Sep 17 00:00:00 2001 From: Benjamin Wohlwend Date: Wed, 14 Feb 2018 15:34:24 +0100 Subject: [PATCH] added 3.7-rc to test matrix, and changed how we build the image a bit this should hopefully cut down on the proliferation of images on Jenkins --- tests/.jenkins_exclude.yml | 2 ++ tests/.jenkins_python.yml | 1 + tests/docker-compose.yml | 4 +--- tests/scripts/docker/docs.sh | 4 ++-- tests/scripts/docker/run_tests.sh | 6 ++++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/.jenkins_exclude.yml b/tests/.jenkins_exclude.yml index e60d835bc..ff1d9975d 100644 --- a/tests/.jenkins_exclude.yml +++ b/tests/.jenkins_exclude.yml @@ -15,6 +15,8 @@ exclude: FRAMEWORK: django-master - PYTHON_VERSION: python-3.4 FRAMEWORK: django-master + - PYTHON_VERSION: python-3.7-rc + FRAMEWORK: django-1.11 # see https://code.djangoproject.com/ticket/28814 - PYTHON_VERSION: pypy-2 FRAMEWORK: django-2.0 - PYTHON_VERSION: pypy-2 diff --git a/tests/.jenkins_python.yml b/tests/.jenkins_python.yml index 4d9f79a4c..8f039d801 100644 --- a/tests/.jenkins_python.yml +++ b/tests/.jenkins_python.yml @@ -4,5 +4,6 @@ PYTHON_VERSION: - python-3.4 - python-3.5 - python-3.6 + - python-3.7-rc - pypy-2 - pypy-3 diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index c6f00afa5..9d7f33121 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -35,9 +35,7 @@ services: - "6379:6379" run_tests: - build: - context: . - dockerfile: Dockerfile + image: apm-agent-python:${PYTHON_VERSION} environment: MONGODB_HOST: 'mongodb' REDIS_HOST: 'redis' diff --git a/tests/scripts/docker/docs.sh b/tests/scripts/docker/docs.sh index df2e4670c..b96d79ab6 100755 --- a/tests/scripts/docker/docs.sh +++ b/tests/scripts/docker/docs.sh @@ -3,8 +3,8 @@ set -e cd tests -docker build -t "lint-docs" -f ./DockerfileDocs . +docker build -t "docs:python" -f ./DockerfileDocs . docker run -e LOCAL_USER_ID=$UID \ -v "$(dirname $(pwd))":/app \ - -i "lint-docs" \ + -i "docs:python" \ make docs diff --git a/tests/scripts/docker/run_tests.sh b/tests/scripts/docker/run_tests.sh index 1ce49e6b5..4f3535cb9 100755 --- a/tests/scripts/docker/run_tests.sh +++ b/tests/scripts/docker/run_tests.sh @@ -11,8 +11,10 @@ docker_pip_cache="/tmp/cache/pip" cd tests -docker-compose build --pull --build-arg PYTHON_IMAGE=${1/-/:} run_tests # replace - with : to get the correct docker image -docker-compose run \ +echo ${1} + +docker build --pull --force-rm --build-arg PYTHON_IMAGE=${1/-/:} -t apm-agent-python:${1} . # replace - with : to get the correct docker image +PYTHON_VERSION=${1} docker-compose run \ -e LOCAL_USER_ID=$UID \ -e PYTHONDONTWRITEBYTECODE=1 -e WEBFRAMEWORK=$2 -e PIP_CACHE=${docker_pip_cache} \ -e WITH_COVERAGE=true \