Repository: EUDAT-B2HANDLE/PYHANDLE (language: python)

Issue:
Docker Files building and testing 



Discussion / hints:

Fix patch:
diff --git a/Dockerfile b/Dockerfile
index 1d7d515..27dd456 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,5 +13,3 @@ ADD        . /opt/PYHANDLE
 WORKDIR    /opt/PYHANDLE
 
 RUN python setup.py install
-
-# TODO: Document usage of this Dockerfile.
\ No newline at end of file
diff --git a/Dockerfile-py3.5 b/Dockerfile-py3.5
index 928d820..40861cb 100644
--- a/Dockerfile-py3.5
+++ b/Dockerfile-py3.5
@@ -2,8 +2,6 @@
 FROM       debian:jessie
 
 # See https://github.com/docker-library/python/blob/master/3.5/Dockerfile
-# Build:
-#docker build -t eudat-pyhandle:py3.5 -f Dockerfile-py3.5 .
 
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
diff --git a/Jenkinsfile b/Jenkinsfile
index 5d2e1e3..aae87bb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -45,6 +45,23 @@ pipeline {
                         cobertura coberturaReportFile: '**/coverage.xml'
                     }
                 }
+                stage ('Test python 3.6') {
+                    agent {
+                        dockerfile {
+                            filename "pyhandle/tests/Dockerfile-py3.6"
+                            dir "$PROJECT_DIR"
+                            additionalBuildArgs "-t eudat-pyhandle:py3.6"
+                            args "-u root:root"
+                        }
+                    }
+                    steps {
+                        sh '''
+                            cd $WORKSPACE/$PROJECT_DIR/pyhandle/tests
+                            ./docker-entrypoint.sh coverage
+                        '''
+                        cobertura coberturaReportFile: '**/coverage.xml'
+                    }
+                }
             }
        }
     }
diff --git a/README.md b/README.md
index b458e01..000620e 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ As [B2Handle](https://github.com/EUDAT-B2SAFE/B2HANDLE) was developed with a spe
 
 
 
+
 # Installation
 
 You can install the PyHandle library as follows:
@@ -43,7 +44,6 @@ Check out the documentation [here](https://eudat-b2safe.github.io/PYHANDLE/).
 
 (You can find the source in the GitHub repository at [/docs/source/index.rst](./docs/source/index.rst)!)
 
-
 # License
 
 Copyright 2015-2021, Deutsches Klimarechenzentrum GmbH, GRNET S.A., SURFsara


Test patch:
diff --git a/pyhandle/tests/Dockerfile b/pyhandle/tests/Dockerfile
index 5da6c67..c04c120 100644
--- a/pyhandle/tests/Dockerfile
+++ b/pyhandle/tests/Dockerfile
@@ -16,4 +16,4 @@ RUN        cd /opt/PYHANDLE && \
 
 WORKDIR    /opt/PYHANDLE/pyhandle/tests
 
-CMD ["./docker-entrypoint.sh", "coverage"]
\ No newline at end of file
+CMD ["./docker-entrypoint.sh", "coverage"]
diff --git a/pyhandle/tests/Dockerfile-py3.6 b/pyhandle/tests/Dockerfile-py3.6
new file mode 100644
index 0000000..e0d67f8
--- /dev/null
+++ b/pyhandle/tests/Dockerfile-py3.6
@@ -0,0 +1,18 @@
+# vim:set ft=dockerfile:
+FROM       python:3.6
+
+RUN        pip install \
+           mock \
+           coverage \
+           nose && \
+           pip install -U "requests==2.23.0" && \
+           pip install -U pymysql
+
+ADD        . /opt/PYHANDLE
+RUN        cd /opt/PYHANDLE && \
+           python setup.py install
+
+WORKDIR    /opt/PYHANDLE/pyhandle/tests
+RUN chmod 755 /opt/PYHANDLE/pyhandle/tests/docker-entrypoint.sh
+
+CMD ["./docker-entrypoint.sh", "coverage"]
diff --git a/pyhandle/tests/Dockerfile-python2.6 b/pyhandle/tests/Dockerfile-python2.6
index 041903e..b2c8214 100644
--- a/pyhandle/tests/Dockerfile-python2.6
+++ b/pyhandle/tests/Dockerfile-python2.6
@@ -1,19 +1,6 @@
 # vim:set ft=dockerfile:
 FROM       eudat-pyhandle:python2.6
 
-# To build base image:
-#cd ../../
-#docker build -t eudat-pyhandle:python2.6 -f Dockerfile-python2.6 .
-# Fails!
-
-# To build this:
-#cd pyhandle/tests
-#docker build -t temp:py2.6 -f Dockerfile-python2.6 .
-# Missing base image!
-
-# Run:
-#docker run -it temp:py2.6
-
 RUN        easy_install pip
 RUN        easy_install wget
 RUN        wget https://bootstrap.pypa.io/get-pip.py
@@ -35,8 +22,3 @@ COPY       docker-entrypoint.sh ./
 ENTRYPOINT ["./docker-entrypoint.sh"]
 
 CMD ["coverage"]
-
-# TODO: Fix this Dockerfile.
-# TODO: Document usage of this Dockerfile.
-
-
diff --git a/pyhandle/tests/docker-entrypoint.sh b/pyhandle/tests/docker-entrypoint.sh
old mode 100755
new mode 100644