4c9247c651cf2f95cc074641d409f46b969d568f
[functest.git] / docker / smoke / Dockerfile
1 FROM opnfv/functest-tempest
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/queens
5 ARG ODL_TAG=85448c9d97b89989488e675b29b38ac42d8674e4
6 ARG REFSTACK_TARGET=2017.09
7 ARG PATROLE_TAG=0.3.0
8
9 COPY thirdparty-requirements.txt thirdparty-requirements.txt
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     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH | \
17         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
18     git clone https://github.com/openstack/patrole.git /src/patrole && \
19     (cd /src/patrole && git checkout $PATROLE_TAG) && \
20     update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
21     git clone --depth 1 https://github.com/openstack/neutron-tempest-plugin.git /src/neutron-tempest-plugin && \
22     update-requirements -s --source /src/openstack-requirements /src/neutron-tempest-plugin && \
23     git clone --depth 1 https://github.com/openstack/barbican-tempest-plugin.git /src/barbican-tempest-plugin && \
24     update-requirements -s --source /src/openstack-requirements /src/barbican-tempest-plugin/ && \
25     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
26         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin -rthirdparty-requirements.txt && \
27     git clone https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
28     (cd /src/odl_test && git checkout $ODL_TAG) && \
29     virtualenv --system-site-packages /src/tempest/.venv && \
30     rm -r upper-constraints.txt upper-constraints.opnfv.txt thirdparty-requirements.txt /src/odl_test/.git \
31         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin && \
32     mkdir -p /home/opnfv/functest/data/refstack && \
33     wget "https://refstack.openstack.org/api/v1/guidelines/${REFSTACK_TARGET}/tests?target=compute&type=required&alias=true&flag=false" \
34         -O /home/opnfv/functest/data/refstack/defcore.txt && \
35     mkdir -p /etc/neutron /etc/glance && \
36     wget -q -O /etc/neutron/policy.json https://raw.githubusercontent.com/openstack/neutron/$OPENSTACK_TAG/etc/policy.json && \
37     wget -q -O /etc/glance/policy.json https://raw.githubusercontent.com/openstack/glance/$OPENSTACK_TAG/etc/policy.json && \
38     apk del .build-deps
39 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
40 CMD ["run_tests", "-t", "all"]