diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-04 20:05:50 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-07 11:34:45 +0200 |
commit | 53f6c3948e048fd8c639704a385f4beae01ebfd9 (patch) | |
tree | 0b5912410d65037322af2e52bb0f9fba825b4a9f /docker/Dockerfile | |
parent | 6c6b03b310cf60b251a52127901431f7d059e45f (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/Dockerfile')
-rw-r--r-- | docker/Dockerfile | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index ff532ccc..d18c6c97 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} |