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..090a8ef 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -7,6 +7,7 @@ pipeline {
         PROJECT_DIR="PYHANDLE"
         GH_USER = 'newgrnetci'
         GH_EMAIL = '<argo@grnet.gr>'
+        
     }
     stages {
         stage ('Run tests for each python version') {
@@ -45,6 +46,57 @@ 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'
+                    }
+                }
+                stage ('Test python 3.7') {
+                    agent {
+                        dockerfile {
+                            filename "pyhandle/tests/Dockerfile-py3.7"
+                            dir "$PROJECT_DIR"
+                            additionalBuildArgs "-t eudat-pyhandle:py3.7"
+                            args "-u root:root"
+                        }
+                    }
+                    steps {
+                        sh '''
+                            cd $WORKSPACE/$PROJECT_DIR/pyhandle/tests
+                            ./docker-entrypoint.sh coverage
+                        '''
+                        cobertura coberturaReportFile: '**/coverage.xml'
+                    }
+                }
+                 stage ('Test python 3.9') {
+                    agent {
+                        dockerfile {
+                            filename "pyhandle/tests/Dockerfile-py3.9"
+                            dir "$PROJECT_DIR"
+                            additionalBuildArgs "-t eudat-pyhandle:py3.9"
+                            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
diff --git a/setup.py b/setup.py
index b50f1aa..d55d2ca 100644
--- a/setup.py
+++ b/setup.py
@@ -94,8 +94,7 @@ def find_version(*file_paths):
           'future',
           'six',
           'pymysql==0.8.0 ; python_version < "2.8.0"',
-          'pymysql==0.8.0 ; python_version < "3.6.0"',
-          'pymysql==1.2.0 ; python_version > "3.6.0"'
+          'pymysql==0.8.0 ; python_version < "3.10.0"',
 
       ],
       tests_require=test_dependencies,


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..6a37108
--- /dev/null
+++ b/pyhandle/tests/Dockerfile-py3.6
@@ -0,0 +1,17 @@
+# 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
+
+CMD ["./docker-entrypoint.sh", "coverage"]
diff --git a/pyhandle/tests/Dockerfile-py3.7 b/pyhandle/tests/Dockerfile-py3.7
new file mode 100644
index 0000000..a17fd86
--- /dev/null
+++ b/pyhandle/tests/Dockerfile-py3.7
@@ -0,0 +1,15 @@
+# vim:set ft=dockerfile:
+FROM       python:3.7
+
+RUN        pip install \
+           mock \
+           coverage \
+           nose
+
+ADD        . /opt/B2HANDLE
+RUN        cd /opt/B2HANDLE && \
+           python setup.py install
+
+WORKDIR    /opt/B2HANDLE/b2handle/tests
+
+CMD ["./docker-entrypoint.sh", "coverage"]
\ No newline at end of file
diff --git a/pyhandle/tests/Dockerfile-py3.9 b/pyhandle/tests/Dockerfile-py3.9
new file mode 100644
index 0000000..c179997
--- /dev/null
+++ b/pyhandle/tests/Dockerfile-py3.9
@@ -0,0 +1,15 @@
+# vim:set ft=dockerfile:
+FROM       python:3.9
+
+RUN        pip install \
+           mock \
+           coverage \
+           nose
+
+ADD        . /opt/PYHANDLE
+RUN        cd /opt/PYHANDLE && \
+           python setup.py install
+
+WORKDIR    /opt/PYHANDLE/pyhandle/tests
+
+CMD ["./docker-entrypoint.sh", "coverage"]CMD ["./docker-entrypoint.sh", "coverage"]
\ No newline at end of file
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.
-
-