Install new neutron-tempest-plugin
[functest.git] / docker / smoke / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/queens
5 ARG ODL_TAG=85448c9d97b89989488e675b29b38ac42d8674e4
6 ARG RALLY_TAG=0.11.2
7 ARG OS_FAULTS_TAG=0.1.17
8 ARG REFSTACK_TARGET=2017.09
9 ARG PATROLE_TAG=0.3.0
10
11 COPY thirdparty-requirements.txt thirdparty-requirements.txt
12 RUN apk --no-cache add --virtual .build-deps --update \
13         python-dev build-base linux-headers libffi-dev \
14         openssl-dev libjpeg-turbo-dev && \
15     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
16         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ \
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 https://github.com/openstack/os-faults.git /src/os-faults && \
22     (cd /src/os-faults && git checkout $OS_FAULTS_TAG) && \
23     update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
24     git clone https://github.com/openstack/rally.git /src/rally && \
25     (cd /src/rally && git checkout $RALLY_TAG) && \
26     update-requirements -s --source /src/openstack-requirements /src/rally/ && \
27     git clone https://github.com/openstack/patrole.git /src/patrole && \
28     (cd /src/patrole && git checkout $PATROLE_TAG) && \
29     update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
30     git clone --depth 1 https://github.com/openstack/neutron-tempest-plugin.git /src/neutron-tempest-plugin && \
31     update-requirements -s --source /src/openstack-requirements /src/neutron-tempest-plugin && \
32     pip install --no-cache-dir --src /src -cupper-constraints.txt \
33         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
34         tempest rally-openstack /src/os-faults && \
35     pip install --no-cache-dir --src /src -cupper-constraints.txt \
36         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
37         /src/rally /src/patrole /src/neutron-tempest-plugin -rthirdparty-requirements.txt && \
38     git clone https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
39     (cd /src/odl_test && git checkout $ODL_TAG) && \
40     virtualenv --system-site-packages /src/tempest/.venv && \
41     pip install --no-cache-dir --src /src -cupper-constraints.txt \
42         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
43         -e git+https://github.com/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron && \
44     pip install --no-cache-dir --src /src -cupper-constraints.txt \
45         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
46         -r /src/neutron/test-requirements.txt && \
47     rm -r upper-constraints.txt thirdparty-requirements.txt /src/odl_test/.git \
48         /src/os-faults /src/rally /src/neutron-tempest-plugin && \
49     mkdir -p /etc/rally && \
50     printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
51     mkdir -p /var/lib/rally/database && rally db create && \
52     mkdir -p /home/opnfv/functest/data/refstack && \
53     wget "https://refstack.openstack.org/api/v1/guidelines/${REFSTACK_TARGET}/tests?target=compute&type=required&alias=true&flag=false" \
54         -O /home/opnfv/functest/data/refstack/defcore.txt && \
55     mkdir -p /etc/neutron /etc/glance && \
56     wget -q -O /etc/neutron/policy.json https://raw.githubusercontent.com/openstack/neutron/$OPENSTACK_TAG/etc/policy.json && \
57     wget -q -O /etc/glance/policy.json https://raw.githubusercontent.com/openstack/glance/$OPENSTACK_TAG/etc/policy.json && \
58     apk del .build-deps
59 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
60 CMD ["run_tests", "-t", "all"]