Leverage on Xtesting
[functest.git] / docker / components / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/pike
5 ARG RALLY_TAG=stable/0.10
6 ARG OS_FAULTS_TAG=0.1.16
7
8 RUN apk --no-cache add --virtual .build-deps --update \
9         python-dev build-base linux-headers libffi-dev \
10         openssl-dev libjpeg-turbo-dev && \
11     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
12         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
13         > upper-constraints.txt && \
14     pip install --no-cache-dir --src /src -cupper-constraints.txt \
15         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
16         -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
17     git clone --depth 1 https://github.com/openstack/os-faults.git -b $OS_FAULTS_TAG /src/os-faults && \
18     update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
19     git clone --depth 1 https://github.com/openstack/rally.git -b $RALLY_TAG /src/rally && \
20     update-requirements -s --source /src/openstack-requirements /src/rally/ && \
21     pip install --no-cache-dir --src /src -cupper-constraints.txt \
22         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
23         tempest /src/os-faults && \
24     pip install --no-cache-dir --src /src -cupper-constraints.txt \
25         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
26         /src/rally && \
27     rm -r upper-constraints.txt /src/os-faults /src/rally && \
28     mkdir -p /etc/rally && \
29     printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
30     mkdir -p /var/lib/rally/database && rally db create && \
31     apk del .build-deps
32 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
33 CMD ["run_tests", "-t", "all"]