From d470e2948e557f2a2dd63bcd95eb9d27c8598e01 Mon Sep 17 00:00:00 2001
From: Lubomir Bucek <lubomir.bucek@eox.at>
Date: Mon, 9 Nov 2020 15:34:54 +0100
Subject: [PATCH] updated testing base image

---
 .gitlab-ci.yml         |  6 +++---
 testing/Dockerfile     | 35 +++++++++++++++++++++++++++++++++++
 testing/gitlab_test.sh |  4 ----
 3 files changed, 38 insertions(+), 7 deletions(-)
 create mode 100644 testing/Dockerfile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0a8cf8e6..b8b7ced9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,7 @@ stages:
   - build
 
 build-tag:
-  image: docker:latest
+  image: registry.gitlab.eox.at/esa/prism/vs/docker-base-testing:latest
   stage: build
   services:
     - docker:dind
@@ -35,7 +35,7 @@ build-tag:
   only:
     - tags
 build-master-staging:
-  image: docker:latest
+  image: registry.gitlab.eox.at/esa/prism/vs/docker-base-testing:latest
   stage: build
   services:
     - docker:dind
@@ -69,7 +69,7 @@ build-master-staging:
   except:
     - tags
 build:
-  image: docker:latest
+  image: registry.gitlab.eox.at/esa/prism/vs/docker-base-testing:latest
   stage: build
   services:
     - docker:dind
diff --git a/testing/Dockerfile b/testing/Dockerfile
new file mode 100644
index 00000000..e423222b
--- /dev/null
+++ b/testing/Dockerfile
@@ -0,0 +1,35 @@
+#------------------------------------------------------------------------------
+#
+# Project: prism view server
+# Authors: Stephan Meissl <stephan.meissl@eox.at>
+#
+#------------------------------------------------------------------------------
+# Copyright (C) 2020 EOX IT Services GmbH <https://eox.at>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies of this Software or works derived from this Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#-----------------------------------------------------------------------------
+
+# this image is built manually and pushed to registry.gitlab.eox.at/esa/prism/vs/docker-base-testing
+
+FROM docker:latest
+
+RUN apk update && apk add bash postgresql-dev gcc g++ python3 python3-dev musl-dev py-pip libffi-dev openssl-dev make gdal==3.1.4-r0 gdal-dev==3.1.4-r0
+
+ADD requirements.txt /
+RUN pip3 install -r requirements.txt
diff --git a/testing/gitlab_test.sh b/testing/gitlab_test.sh
index 8ce6b51f..8cb3e2c1 100755
--- a/testing/gitlab_test.sh
+++ b/testing/gitlab_test.sh
@@ -38,10 +38,6 @@ printf $sftp_users_emg | docker config create sftp_users_emg -
 
 docker stack deploy -c ../docker-compose.emg.yml -c ../docker-compose.emg.dev.yml emg-pvs
 
-# installing the requirments
-apk update && apk add bash postgresql-dev gcc g++ python3 python3-dev musl-dev py-pip libffi-dev openssl-dev make gdal==3.1.4-r0 gdal-dev==3.1.4-r0
-pip3 install -r requirements.txt
-
 ./docker-stack-wait.sh -n renderer -n registrar -n preprocessor -n ingestor -n sftp emg-pvs
 
 docker service ls
-- 
GitLab