1 FROM opnfv/functest-core
4 ARG OPENSTACK_TAG=stable/pike
6 ARG RALLY_TAG=stable/0.10
7 ARG OS_FAULTS_TAG=0.1.16
8 ARG REFSTACK_TAG=master
10 RUN apk --no-cache add --virtual .build-deps --update \
11 python-dev build-base linux-headers libffi-dev \
12 openssl-dev libjpeg-turbo-dev && \
13 wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
14 sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
15 > upper-constraints.txt && \
16 pip install --no-cache-dir --src /src -cupper-constraints.txt \
17 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
18 -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
19 git clone --depth 1 https://github.com/openstack/os-faults.git -b $OS_FAULTS_TAG /src/os-faults && \
20 update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
21 git clone --depth 1 https://github.com/openstack/rally.git -b $RALLY_TAG /src/rally && \
22 update-requirements -s --source /src/openstack-requirements /src/rally/ && \
23 git clone https://github.com/openstack/refstack-client.git /src/refstack-client && \
24 (cd src/refstack-client && git checkout $REFSTACK_TAG) && \
25 update-requirements -s --source /src/openstack-requirements /src/refstack-client/ && \
26 pip install --no-cache-dir --src /src -cupper-constraints.txt \
27 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
28 tempest /src/os-faults && \
29 pip install --no-cache-dir --src /src -cupper-constraints.txt \
30 -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
31 -e/src/refstack-client /src/rally && \
32 git clone https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
33 (cd src/odl_test && git checkout $ODL_TAG) && \
34 ln -s /src/tempest /src/refstack-client/.tempest && \
35 virtualenv --system-site-packages /src/tempest/.venv && \
36 rm -r upper-constraints.txt /src/refstack-client/.git /src/odl_test/.git /src/os-faults /src/rally && \
37 mkdir -p /etc/rally && \
38 printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
39 mkdir -p /var/lib/rally/database && rally db create && \
41 COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml
42 CMD ["bash","-c","prepare_env start && run_tests -t all"]