aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-06-04 20:05:50 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-06-07 11:34:45 +0200
commit53f6c3948e048fd8c639704a385f4beae01ebfd9 (patch)
tree0b5912410d65037322af2e52bb0f9fba825b4a9f /docker
parent6c6b03b310cf60b251a52127901431f7d059e45f (diff)
Leverage on pbr (Python Build Reasonableness)
pbr can inject requirements into the install_requires, tests_require and/or dependency_links arguments to setup. They were previously falsy unset. It also supports conditional dependencies which can be added to the requirements (e.g. subprocess32; python_version=='2.7'). Then requirements.py3.txt is removed. It also removes functest/cli/setup.py which seems false and obsolete. Dockerfile is updated as well. One temporarily link is created because of several hardcoded paths in Functest. Change-Id: I14b3b25e07fbac490dd1d5ce943ec02c5b11f242 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile30
-rw-r--r--docker/Dockerfile.aarch6428
2 files changed, 32 insertions, 26 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index ff532ccc6..d18c6c97d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -68,7 +68,7 @@ wget \
RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
-RUN mkdir -p ${REPOS_DIR} \
+RUN mkdir -p ${FUNCTEST_REPO_DIR} \
&& mkdir -p ${REPOS_VNFS_DIR} \
&& mkdir -p ${FUNCTEST_BASE_DIR}/results \
&& mkdir -p ${FUNCTEST_CONF_DIR} \
@@ -79,8 +79,16 @@ RUN mkdir -p ${REPOS_DIR} \
RUN git config --global http.sslVerify false
+RUN pip install \
+ git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \
+ git+https://gerrit.opnfv.org/gerrit/releng@$BRANCH#egg=opnfv\&subdirectory=modules \
+ git+https://gerrit.opnfv.org/gerrit/barometer@$BRANCH#egg=baro_tests \
+ git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps
+
+# Hook required by hardcoded paths in Functest
+RUN ln -s /usr/local/lib/python2.7/dist-packages/functest ${FUNCTEST_REPO_DIR}/functest
+
# OPNFV repositories
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/functest ${REPOS_DIR}/functest
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/sdnvpn ${REPOS_DIR}/sdnvpn
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
@@ -108,33 +116,28 @@ RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_
RUN pip install -r ${REPOS_DIR}/rally/requirements.txt
RUN pip install -r ${REPOS_DIR}/tempest/requirements.txt
-
-RUN cd ${FUNCTEST_REPO_DIR} \
- && pip install -r requirements.txt \
- && pip install -e .
-
RUN pip install ${REPOS_DIR}/opera
-RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
+RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
-not -path "*tests/unit*" \
-not -path "*functest_venv*" \
|xargs grep -L __main__ |cut -d\: -f 1 |xargs chmod -c 644 \
- && find ${FUNCTEST_REPO_DIR} -name "*.sh" \
+ && find -L ${FUNCTEST_REPO_DIR} -name "*.sh" \
-not -path "*functest_venv*" \
|xargs grep -L \#\! |cut -d\: -f 1 |xargs chmod -c 644
-RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
+RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
-not -path "*tests/unit*" \
-not -path "*functest_venv*" \
|xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 \
- && find ${FUNCTEST_REPO_DIR} -name "*.sh" \
+ && find -L ${FUNCTEST_REPO_DIR} -name "*.sh" \
-not -path "*functest_venv*" \
|xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755
RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR}
RUN ${REPOS_DIR}/rally/install_rally.sh --yes
-RUN /bin/bash ${REPOS_DIR}/functest/docker/add_images.sh
+RUN add_images.sh
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN curl -L https://get.rvm.io | bash -s stable
@@ -148,8 +151,7 @@ RUN cd ${REPOS_DIR}/sdnvpn && pip install -e .
RUN cd ${REPOS_DIR}/bgpvpn && pip install -e .
# Kingbird integration
-RUN cd ${REPOS_DIR}/kingbird && pip install -e .
-RUN cd ${FUNCTEST_REPO_DIR} && pip install -r kingbird_requirements.txt
+RUN cd ${REPOS_DIR}/kingbird && pip install -e . -r test-requirements.txt
# refstack-client integration
RUN cd ${REPOS_DIR}/refstack-client && ./setup_env -t ${REFSTACK_TAG}
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64
index 44e6904b1..eea475a8f 100644
--- a/docker/Dockerfile.aarch64
+++ b/docker/Dockerfile.aarch64
@@ -67,7 +67,7 @@ wget \
RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
-RUN mkdir -p ${REPOS_DIR} \
+RUN mkdir -p ${FUNCTEST_REPO_DIR} \
&& mkdir -p ${REPOS_VNFS_DIR} \
&& mkdir -p ${FUNCTEST_BASE_DIR}/results \
&& mkdir -p ${FUNCTEST_BASE_DIR}/conf \
@@ -78,8 +78,16 @@ RUN mkdir -p ${REPOS_DIR} \
RUN git config --global http.sslVerify false
+RUN pip install \
+ git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \
+ git+https://gerrit.opnfv.org/gerrit/releng@$BRANCH#egg=opnfv\&subdirectory=modules \
+ git+https://gerrit.opnfv.org/gerrit/barometer@$BRANCH#egg=baro_tests \
+ git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps
+
+# Hook required by hardcoded paths in Functest
+RUN ln -s /usr/local/lib/python2.7/dist-packages/functest ${FUNCTEST_REPO_DIR}/functest
+
# OPNFV repositories
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/functest ${REPOS_DIR}/functest
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/copper ${REPOS_DIR}/copper
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/sdnvpn ${REPOS_DIR}/sdnvpn
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/domino ${REPOS_DIR}/domino
@@ -105,30 +113,26 @@ RUN git clone --depth 1 https://github.com/wuwenbin2/OnosSystemTest.git ${REPOS_
RUN pip install -r ${REPOS_DIR}/rally/requirements.txt
RUN pip install -r ${REPOS_DIR}/tempest/requirements.txt
-RUN cd ${FUNCTEST_REPO_DIR} \
- && pip install -r requirements.txt \
- && pip install -e .
-
-RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
+RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
-not -path "*tests/unit*" \
-not -path "*functest_venv*" \
|xargs grep -L __main__ |cut -d\: -f 1 |xargs chmod -c 644 \
- && find ${FUNCTEST_REPO_DIR} -name "*.sh" \
+ && find -L ${FUNCTEST_REPO_DIR} -name "*.sh" \
-not -path "*functest_venv*" \
|xargs grep -L \#\! |cut -d\: -f 1 |xargs chmod -c 644
-RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
+RUN find -L ${FUNCTEST_REPO_DIR} -name "*.py" \
-not -path "*tests/unit*" \
-not -path "*functest_venv*" \
|xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 \
- && find ${FUNCTEST_REPO_DIR} -name "*.sh" \
+ && find -L ${FUNCTEST_REPO_DIR} -name "*.sh" \
-not -path "*functest_venv*" \
|xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755
RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR}
RUN ${REPOS_DIR}/rally/install_rally.sh --yes
-RUN /bin/bash ${REPOS_DIR}/functest/docker/add_images.sh
+RUN add_images.sh
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN curl -L https://get.rvm.io | bash -s stable
@@ -144,7 +148,7 @@ RUN cd ${REPOS_DIR}/sdnvpn && pip install -e .
RUN cd ${REPOS_DIR}/bgpvpn && pip install -e .
# Kingbird integration
-RUN cd ${REPOS_DIR}/kingbird && pip install -e .
+RUN cd ${REPOS_DIR}/kingbird && pip install -e . -r test-requirements.txt
# refstack-client integration
RUN cd ${REPOS_DIR}/refstack-client && ./setup_env -t ${REFSTACK_TAG}