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