# devops-stages/stage-build.sh
#
-FROM ubuntu:18.04
+FROM ubuntu:20.04
ARG APT_PROXY
RUN if [ ! -z $APT_PROXY ] ; then \
debhelper \
dh-make \
git \
- python3.8 \
+ python3 \
python3-all \
python3-dev \
python3-setuptools
-RUN python3 -m easy_install pip==21.0.1
-RUN pip3 install tox==3.22.0
+RUN python3 -m easy_install pip==21.3.1
+RUN pip install tox==3.24.5
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
set -eu
-if [ $(git diff --name-only origin/$GERRIT_BRANCH -- installers/charm/ |wc -l) -eq 0 ]; then
- exit 0
-fi
-
CURRENT_DIR=`pwd`
# Execute tests for charms
CHARM_PATH="./installers/charm"
-CHARM_NAMES="keystone prometheus grafana"
+CHARM_NAMES="osm-lcm osm-mon osm-nbi osm-ng-ui osm-pol osm-ro keystone prometheus grafana vca-integrator-operator"
for charm in $CHARM_NAMES; do
- cd $CHARM_PATH/$charm
- TOX_PARALLEL_NO_SPINNER=1 tox --parallel=auto
- cd $CURRENT_DIR
+ if [ $(git diff --name-only "origin/${GERRIT_BRANCH}" -- "installers/charm/${charm}" | wc -l) -ne 0 ]; then
+ echo "Running tox for ${charm}"
+ cd "${CHARM_PATH}/${charm}"
+ TOX_PARALLEL_NO_SPINNER=1 tox -e lint,unit --parallel=auto
+ cd "${CURRENT_DIR}"
+ fi
done
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
+basepython = python3.8
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
+basepython = python3.8
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
+basepython = python3.8
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
+basepython = python3.8
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
+basepython = python3.8
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
+basepython = python3.8
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
all_path = {[vars]src_path} {[vars]tst_path} {[vars]lib_path}
[testenv]
+basepython = python3.8
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace