4 ARG OPENSTACK_TAG=stable/ocata
5 ARG RALLY_TAG=stable/0.10
6 ARG OS_FAULTS_TAG=0.1.16
8 RUN apk --no-cache add --update \
9 python libffi libssl1.0 libjpeg-turbo py-pip bash \
10 grep sed wget ca-certificates git openssh-client && \
11 apk --no-cache add --virtual .build-deps --update \
12 python-dev build-base linux-headers libffi-dev \
13 openssl-dev libjpeg-turbo-dev && \
14 wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
15 sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ | \
16 sed s/^requests===.*$/requests===2.13.0/ \
17 > upper-constraints.txt && \
18 pip install --no-cache-dir --src /src -cupper-constraints.txt \
19 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
20 -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
21 git clone --depth 1 https://github.com/openstack/os-faults.git -b $OS_FAULTS_TAG /src/os-faults && \
22 update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
23 git clone --depth 1 https://github.com/openstack/rally.git -b $RALLY_TAG /src/rally && \
24 update-requirements -s --source /src/openstack-requirements /src/rally/ && \
25 pip install --no-cache-dir --src /src -cupper-constraints.txt \
26 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
27 /src/os-faults /src/rally && \
28 pip install --no-cache-dir --src /src -cupper-constraints.txt \
29 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
30 git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest && \
31 rm -r upper-constraints.txt /src/os-faults/.git /src/rally/.git && \
32 mkdir -p /etc/rally && \
33 printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
34 mkdir -p /var/lib/rally/database && rally-manage db create && \
35 bash -c "mkdir -p /home/opnfv/functest{/conf,/data,/images,/results} /home/opnfv/repos/vnfs" && \