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 COPY Allow-offline-testing-in-PodWithClusterIPSvc.patch /tmp/Allow-offline-testing-in-PodWithClusterIPSvc.patch
10 RUN 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 && \
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 sed -i -E /^kubernetes==+.*$/d /src/requirements/upper-constraints.txt && \
18 case $(uname -m) in aarch*|arm*) \
19 sed -i -E /^PyNaCl=/d /src/requirements/upper-constraints.txt && \
20 apk add --no-cache py3-pynacl ;; esac && \
21 apk --no-cache add --update py3-distlib\>=0.3.1 \
22 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main && \
23 git init /src/functest-kubernetes && \
24 (cd /src/functest-kubernetes && \
25 git fetch --tags https://gerrit.opnfv.org/gerrit/functest-kubernetes $BRANCH && \
26 git checkout FETCH_HEAD) && \
27 pip3 install --no-cache-dir --src /src \
28 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$OPNFV_TAG \
29 -c/src/requirements/upper-constraints.txt \
30 /src/functest-kubernetes && \
31 (cd /src/rally && patch -p1 < /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch) && \
32 (cd /usr/lib/python3.8/site-packages/xrally_kubernetes/ && \
33 patch -p2 < /tmp/Try-a-quick-fix-vs-asynchronuous-issues.patch && \
34 patch -p2 < /tmp/Allow-offline-testing-in-PodWithClusterIPSvc.patch) && \
35 rm -rf /src/functest-kubernetes /tmp/Switch-to-threading.Thread-for-Rally-tasks.patch && \
36 bash -c "mkdir -p /var/lib/xtesting /home/opnfv" && \
37 ln -s /var/lib/xtesting /home/opnfv/functest && \
38 mkdir -p /etc/rally && \
39 printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
40 mkdir -p /var/lib/rally/database && rally db create && \
41 rm -r /src/requirements/.git /tmp/Try-a-quick-fix-vs-asynchronuous-issues.patch \
42 /tmp/Allow-offline-testing-in-PodWithClusterIPSvc.patch && \
44 COPY logging.ini /usr/lib/python3.8/site-packages/xtesting/ci/logging.ini
45 COPY logging.debug.ini /usr/lib/python3.8/site-packages/xtesting/ci/logging.debug.ini
46 CMD ["run_tests", "-t", "all"]