aboutsummaryrefslogtreecommitdiffstats
path: root/docker/core/Dockerfile
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-06-14 12:51:22 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-06-15 09:14:09 +0200
commit3f9adc62e5c659c958ca164af337e94e592ed31f (patch)
tree607344f224f46e24b5f5e9c39d4025f82ad1bae3 /docker/core/Dockerfile
parent539051c95e05851c323ac9fa351cd4e2bbd9d612 (diff)
Clone repositories instead of wgetting constraints
It stops leveraging on wget to get constraints as it fails since opendev was created. Then functest and requirements are no longer removed for functest-core which simplifies all child Dockerfile. It also fix the current incompatibilities in OpenStack constraints ERROR: cliff 3.2.0 has requirement cmd2!=0.8.3,<0.9.0,>=0.8.0, but you'll have cmd2 1.1.0 which is incompatible. https://github.com/openstack/requirements/blob/master/upper-constraints.txt#L230 https://github.com/openstack/requirements/blob/master/upper-constraints.txt#L416 Change-Id: I7c044208ef26ad047fb841710b422acb6c9f0320 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 961b940c796871e40146b90cf19b48390310dd59)
Diffstat (limited to 'docker/core/Dockerfile')
-rw-r--r--docker/core/Dockerfile28
1 files changed, 15 insertions, 13 deletions
diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile
index f2404ab6d..f1b973663 100644
--- a/docker/core/Dockerfile
+++ b/docker/core/Dockerfile
@@ -10,25 +10,27 @@ RUN apk --no-cache add --update \
apk --no-cache add --virtual .build-deps --update \
python3-dev build-base linux-headers libffi-dev \
openssl-dev libjpeg-turbo-dev && \
- wget -q -O- https://opendev.org/openstack/requirements/raw/branch/$OPENSTACK_TAG/upper-constraints.txt > upper-constraints.txt && \
- case $(uname -m) in aarch*|arm*) sed -i -E /^PyNaCl=/d upper-constraints.txt && apk add --no-cache py3-pynacl ;; esac && \
- wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH > upper-constraints.opnfv.txt && \
- sed -i -E /#egg=functest/d upper-constraints.opnfv.txt && \
- sed -i -E /^tempest==+.*$/d upper-constraints.txt && \
- pip3 install --no-cache-dir --src /src -cupper-constraints.opnfv.txt -cupper-constraints.txt \
- -e git+https://opendev.org/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
+ git init /src/requirements && \
+ (cd /src/requirements && \
+ git fetch --tags https://review.opendev.org/openstack/requirements $OPENSTACK_TAG && \
+ git checkout FETCH_HEAD) && \
git init /src/functest && \
(cd /src/functest && \
git fetch --tags https://gerrit.opnfv.org/gerrit/functest $BRANCH && \
git checkout FETCH_HEAD) && \
- update-requirements -s --source /src/openstack-requirements /src/functest && \
- pip3 install --no-cache-dir --src /src -cupper-constraints.opnfv.txt -cupper-constraints.txt \
- /src/functest && \
+ case $(uname -m) in aarch*|arm*) sed -i -E /^PyNaCl=/d /src/requirements/upper-constraints.txt && apk add --no-cache py3-pynacl ;; esac && \
+ sed -i -E /#egg=functest/d /src/functest/upper-constraints.txt && \
+ sed -i -E /^tempest==+.*$/d /src/requirements/upper-constraints.txt && \
+ pip3 install --no-cache-dir --src /src -c/src/functest/upper-constraints.txt -c/src/requirements/upper-constraints.txt \
+ -e /src/requirements && \
+ update-requirements -s --source /src/requirements /src/functest && \
+ pip3 install --no-cache-dir --src /src -c/src/functest/upper-constraints.txt -c/src/requirements/upper-constraints.txt \
+ -e /src/functest && \
(cd /src/rally && patch -p1 < /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch) && \
- rm -r upper-constraints.txt upper-constraints.opnfv.txt /src/functest \
+ rm -r /src/requirements/.git /src/functest/.git \
/tmp/Switch-to-threading.Thread-for-Rally-tasks.patch && \
- cp /usr/lib/python3.8/site-packages/functest/ci/logging.ini /usr/lib/python3.8/site-packages/xtesting/ci/ && \
- cp /usr/lib/python3.8/site-packages/functest/ci/logging.debug.ini /usr/lib/python3.8/site-packages/xtesting/ci/ && \
+ cp /src/functest/functest/ci/logging.ini /usr/lib/python3.8/site-packages/xtesting/ci/ && \
+ cp /src/functest/functest/ci/logging.debug.ini /usr/lib/python3.8/site-packages/xtesting/ci/ && \
bash -c "mkdir -p /var/lib/xtesting /home/opnfv" && \
ln -s /var/lib/xtesting /home/opnfv/functest && \
bash -c "mkdir -p /home/opnfv/functest{/conf,/data,/images,/results} /home/opnfv/repos/vnfs" && \