From 22aa932054bc6b28b930f4e85bb1b8029860c13e Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Fri, 15 Apr 2022 14:51:02 -0400 Subject: [PATCH] Attempt to Reuse Build Container for Tests --- .gitlab-ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9c0b80..44c39cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,10 +14,22 @@ buiild job: - pip3 install --upgrade setuptools - pip3 install Flask gunicorn pytest pytest-cov - pip3 install pendulum + - echo "DOCKER_IMAGE_NAME_TAG_WITH_DIGEST=${DOCKER_IMAGE_TAG_REF}@$(cat /digest-file)" > out.env + - cat out.env + artifacts: + reports: + dotenv: out.env + + test job: stage: test - image: python:3-buster + needs: + - build + image: ${DOCKER_IMAGE_NAME_TAG_WITH_DIGEST} + before_script: + # versions + - echo "${DOCKER_IMAGE_NAME_TAG_WITH_DIGEST}" script: - export PYTHONPATH=. - export FLASK_APP=period