# This Dockerfile is intented for devops and deb package generation
#
-# Use docker/Dockerfile-local for running osm/RO in a docker container from source
+# Use Dockerfile-local for running osm/RO in a docker container from source
FROM ubuntu:16.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 flake8 apt-utils && \
- DEBIAN_FRONTEND=noninteractive pip3 install -U setuptools setuptools-version-command stdeb
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-all libssl-dev apt-utils && \
+ DEBIAN_FRONTEND=noninteractive pip3 install -U setuptools setuptools-version-command stdeb && \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev mysql-client
-# FROM ubuntu:16.04
-
-# RUN apt-get update && \
-# DEBIAN_FRONTEND=noninteractive apt-get -y install git make python python-pip debhelper python3 python3-all python3-pip python3-setuptools && \
-# DEBIAN_FRONTEND=noninteractive apt-get -y install wget tox apt-utils flake8 python-nose python-mock && \
-# DEBIAN_FRONTEND=noninteractive pip install pip==9.0.3 && \
-# DEBIAN_FRONTEND=noninteractive pip3 install pip==9.0.3 && \
-# DEBIAN_FRONTEND=noninteractive pip install -U setuptools setuptools-version-command stdeb && \
-# DEBIAN_FRONTEND=noninteractive pip install -U pyang pyangbind && \
-# DEBIAN_FRONTEND=noninteractive pip3 install -U pyang pyangbind && \
-# DEBIAN_FRONTEND=noninteractive apt-get -y install python-yaml python-netaddr python-boto && \
-# DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \
-# DEBIAN_FRONTEND=noninteractive add-apt-repository -y cloud-archive:queens && \
-# DEBIAN_FRONTEND=noninteractive apt-get update && \
-# DEBIAN_FRONTEND=noninteractive apt-get -y install python-novaclient python-keystoneclient python-glanceclient python-cinderclient python-neutronclient python-networking-l2gw && \
-# DEBIAN_FRONTEND=noninteractive pip install -U progressbar pyvmomi pyvcloud==19.1.1 && \
-# DEBIAN_FRONTEND=noninteractive pip install -U fog05rest && \
-# DEBIAN_FRONTEND=noninteractive pip install -U azure && \
-# DEBIAN_FRONTEND=noninteractive apt-get -y install python-argcomplete python-bottle python-cffi python-packaging python-paramiko python-pkgconfig libmysqlclient-dev libssl-dev libffi-dev python-mysqldb && \
-# DEBIAN_FRONTEND=noninteractive apt-get -y install python-logutils python-openstackclient python-openstacksdk && \
-# DEBIAN_FRONTEND=noninteractive pip install untangle && \
-# DEBIAN_FRONTEND=noninteractive pip install pyone && \
-# DEBIAN_FRONTEND=noninteractive pip install -e git+https://github.com/python-oca/python-oca#egg=oca
+ # needed for tests: libmysqlclient-dev mysql-client tox
# TODO py3 comment
# Uncomment this block to generate automatically a debian package and show info
# WORKDIR /app
# # Copy the current directory contents into the container at /app
# ADD . /app
-# CMD /app/devops-stages/stage-build.sh && find -name "*.deb" -exec dpkg -I {} ";"
+# CMD /app/devops-stages/stage-build.sh && find deb_dist -name "*.deb" -exec dpkg -I {} ";"
# limitations under the License.
[tox]
-#envlist = py27,py3
-envlist = py35
-toxworkdir={homedir}/.tox
+envlist = flake8, unittest
+toxworkdir={toxinidir}/.tox
[testenv]
-deps=nose
- mock
-commands=nosetests
+usedevelop = True
+basepython = python3
+install_command = python3 -m pip install -r requirements.txt -U {opts} {packages}
[testenv:flake8]
-basepython = python
+basepython = python3
deps = flake8
# TODO for the moment few files are tested.
commands = flake8 osm_ro/wim --max-line-length 120 \
# See the License for the specific language governing permissions and
# limitations under the License.
-flake8 RO/osm_ro/wim RO/osm_ro/vim_thread.py --max-line-length 120 \
- --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp,osm_im --ignore W291,W293,E226,E402,W504
+tox -c RO/tox.ini