fix 1138 forcing cryptography version 2.5 or higher
Some fixing in devops-stages/stage-build
Use US18.04 for Dockerfile used for devops-stages
Change-Id: Ia2cb09e21efe11a22013de48b2404f5ead949a71
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/Dockerfile b/Dockerfile
index ee707b0..9ed97d6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,15 +17,14 @@
#
# Use Dockerfile-local for running osm/RO in a docker container from source
-FROM ubuntu:16.04
+FROM ubuntu:18.04
RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python-all python3 python3-pip debhelper wget && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-all libssl-dev apt-utils && \
- DEBIAN_FRONTEND=noninteractive python3 -m pip install -U setuptools setuptools-version-command stdeb && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev mysql-client
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python3 python3-pip debhelper wget \
+ python3-all apt-utils libmysqlclient-dev mysql-client && \
+ DEBIAN_FRONTEND=noninteractive python3 -m pip install -U setuptools setuptools-version-command stdeb
+ # needed for tests: libmysqlclient-dev mysql-client tox
- # needed for tests: libmysqlclient-dev mysql-client tox
-
+ # TODO remove apt # libssl-dev
# TODO py3 comment
# Uncomment this block to generate automatically a debian package and show info
# # Set the working directory to /app
@@ -33,4 +32,3 @@
# # Copy the current directory contents into the container at /app
# ADD . /app
# CMD /app/devops-stages/stage-build.sh && find deb_dist -name "*.deb" -exec dpkg -I {} ";"
-
diff --git a/NG-RO/debian/python3-osm-ng-ro.postinst b/NG-RO/debian/python3-osm-ng-ro.postinst
index 09b59d2..87416ac 100755
--- a/NG-RO/debian/python3-osm-ng-ro.postinst
+++ b/NG-RO/debian/python3-osm-ng-ro.postinst
@@ -21,5 +21,4 @@
echo "Installing python dependencies via pip..."
# python3 -m pip install -U pip
-python3 -m pip install cherrypy==18.1.2
-
+python3 -m pip install -U "cherrypy==18.1.2" "cryptography>=2.5"
diff --git a/NG-RO/setup.py b/NG-RO/setup.py
index a001836..a6cf47a 100644
--- a/NG-RO/setup.py
+++ b/NG-RO/setup.py
@@ -40,7 +40,7 @@
'jsonschema',
'PyYAML',
'requests',
- 'cryptography',
+ 'cryptography', # >=2.5 installed right version with the debian post-install script
'osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git#egg=osm-im',
"osm-ro-plugin @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin",
],
diff --git a/RO/Makefile b/RO/Makefile
index b41748d..15dce71 100644
--- a/RO/Makefile
+++ b/RO/Makefile
@@ -28,6 +28,7 @@
# apt-get install -y python-stdeb
python3 setup.py --command-packages=stdeb.command sdist_dsc
cp debian/python3-osm-ro.postinst deb_dist/osm-ro*/debian/
+ # cd deb_dist/osm-nbi*/debian && echo "cryptography python3-cryptography (>= 1.9)" > py3dist-overrides
cd deb_dist/osm-ro*/ && dpkg-buildpackage -rfakeroot -uc -us
# mkdir -p .build
# cp build/deb_dist/python-*.deb .build/
diff --git a/RO/debian/python3-osm-ro.postinst b/RO/debian/python3-osm-ro.postinst
index 02f356b..877a496 100755
--- a/RO/debian/python3-osm-ro.postinst
+++ b/RO/debian/python3-osm-ro.postinst
@@ -18,4 +18,5 @@
##
echo "POST INSTALL OSM-RO"
-# nothing to do
+# Ensure a proper version of cryptography, needed by paramiko
+python3 -m pip install "cryptography>=2.5" -U
diff --git a/RO/setup.py b/RO/setup.py
index 4bd2223..836f6f2 100755
--- a/RO/setup.py
+++ b/RO/setup.py
@@ -36,7 +36,6 @@
"jsonschema",
"paramiko",
"mysqlclient",
- #"MySQLdb",
# common to VIMS
"requests",
diff --git a/devops-stages/stage-build.sh b/devops-stages/stage-build.sh
index d14f8d9..5ac3f7a 100755
--- a/devops-stages/stage-build.sh
+++ b/devops-stages/stage-build.sh
@@ -17,7 +17,7 @@
mkdir -p deb_dist
# main RO module
-make -C RO clean package BRANCH=master
+make -C RO clean package
cp RO/deb_dist/python3-osm-ro_*.deb deb_dist/
# RO client
@@ -28,6 +28,10 @@
make -C RO-plugin clean package
cp RO-plugin/deb_dist/python3-osm-ro-plugin_*.deb deb_dist/
+# NG-RO
+make -C NG-RO clean package
+cp NG-RO/deb_dist/python3-osm-ng-ro_*.deb deb_dist/
+
# VIM plugings: vmware, openstack, AWS, fos, azure, Opennebula,
for vim_plugin in RO-VIM-*
do
diff --git a/test-docker/Dockerfile-devops b/test-docker/Dockerfile-devops
index 855ef81..5f094ab 100644
--- a/test-docker/Dockerfile-devops
+++ b/test-docker/Dockerfile-devops
@@ -24,7 +24,7 @@
&& python3 -m pip install --upgrade pip && python3 -m pip install pyangbind networking-l2gw
ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
-ARG RELEASE=ReleaseSIX-daily
+ARG RELEASE=ReleaseEIGHT-daily
ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
ARG REPOSITORY=testing
diff --git a/test-docker/test-gen-devops.sh b/test-docker/test-gen-devops.sh
index a869031..3b85166 100755
--- a/test-docker/test-gen-devops.sh
+++ b/test-docker/test-gen-devops.sh
@@ -26,7 +26,7 @@
--no-cache Use if found problems looking for packages
--update Use to update OSM, RO docker with this image" && exit 0
-[[ "$*" == *--no-cache* ]] && no_cache="--no_cache" || no_cache=""
+[[ "$*" == *--no-cache* ]] && no_cache="--no-cache" || no_cache=""
[[ "$*" == *--update* ]] && update_osm="k8s" || update_osm=""
HERE=$(dirname $(readlink -f ${BASH_SOURCE[0]}))