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