4 ARG OPENSTACK_TAG=master
7 COPY Try-a-quick-fix-vs-asynchronuous-issues.patch /tmp/Try-a-quick-fix-vs-asynchronuous-issues.patch
8 COPY Switch-to-threading.Thread-for-Rally-tasks.patch /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch
9 RUN apk -U upgrade && \
10 apk --no-cache add --update python3 py3-pip py3-wheel bash git grep libffi openssl mailcap && \
11 apk --no-cache add --virtual .build-deps --update \
12 python3-dev build-base libffi-dev openssl-dev rust cargo && \
13 git init /src/requirements && \
14 (cd /src/requirements && \
15 git fetch --tags https://review.opendev.org/openstack/requirements $OPENSTACK_TAG && \
16 git checkout FETCH_HEAD) && \
17 case $(uname -m) in aarch*|arm*) \
18 sed -i -E /^PyNaCl=/d /src/requirements/upper-constraints.txt && \
19 apk add --no-cache py3-pynacl ;; esac && \
20 sed -i -E /^six=/d /src/requirements/upper-constraints.txt && \
21 sed -i -E /^distlib=/d /src/requirements/upper-constraints.txt && \
22 sed -i -E /^packaging=/d /src/requirements/upper-constraints.txt && \
23 apk --no-cache add --update py3-distlib\>=0.3.1 \
24 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main && \
25 git init /src/functest-kubernetes && \
26 (cd /src/functest-kubernetes && \
27 git fetch --tags https://gerrit.opnfv.org/gerrit/functest-kubernetes $BRANCH && \
28 git checkout FETCH_HEAD) && \
29 pip3 install --use-deprecated=legacy-resolver --no-cache-dir --src /src \
30 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$OPNFV_TAG \
31 -c/src/requirements/upper-constraints.txt \
33 pip3 install --use-deprecated=legacy-resolver --no-cache-dir --src /src \
34 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$OPNFV_TAG \
35 -c/src/requirements/upper-constraints.txt \
36 /src/functest-kubernetes && \
37 (cd /src/rally && patch -p1 < /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch) && \
38 (cd /usr/lib/python3.9/site-packages/xrally_kubernetes/ && \
39 patch -p2 < /tmp/Try-a-quick-fix-vs-asynchronuous-issues.patch) && \
40 rm -rf /src/functest-kubernetes /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch && \
41 bash -c "mkdir -p /var/lib/xtesting /home/opnfv" && \
42 ln -s /var/lib/xtesting /home/opnfv/functest && \
43 mkdir -p /etc/rally && \
44 printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
45 mkdir -p /var/lib/rally/database && rally db create && \
46 rm -r /src/requirements/.git /tmp/Try-a-quick-fix-vs-asynchronuous-issues.patch && \
48 COPY logging.ini /usr/lib/python3.9/site-packages/xtesting/ci/logging.ini
49 COPY logging.debug.ini /usr/lib/python3.9/site-packages/xtesting/ci/logging.debug.ini
50 CMD ["run_tests", "-t", "all"]