Run Intel NFV CI test-cases inside functest smoke
[functest.git] / docker / smoke / Dockerfile
1 FROM opnfv/functest-tempest
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=master
5 ARG REFSTACK_TARGET=2018.02
6 ARG PATROLE_TAG=0.4.0
7 ARG NEUTRON_TAG=master
8 ARG BARBICAN_TAG=0.1.0
9 ARG NEUTRON_RALLY_TAG=master
10 ARG INTEL_TAG=refs/changes/04/571004/4
11
12 RUN apk --no-cache add --update libvirt-dev && \
13     apk --no-cache add --virtual .build-deps --update \
14         python-dev build-base linux-headers libffi-dev \
15         openssl-dev libjpeg-turbo-dev && \
16     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
17         sed -E s/^tempest==+.*$/-e\ git+https:\\/\\/git.openstack.org\\/openstack\\/tempest#egg=tempest/ \
18         > upper-constraints.txt && \
19     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH | \
20         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
21     git init /src/patrole && \
22     (cd /src/patrole && \
23         git fetch --tags https://git.openstack.org/openstack/patrole.git $PATROLE_TAG && \
24         git checkout FETCH_HEAD) && \
25     update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
26     git init /src/neutron-tempest-plugin && \
27     (cd /src/neutron-tempest-plugin && \
28         git fetch --tags https://git.openstack.org/openstack/neutron-tempest-plugin.git $NEUTRON_TAG && \
29         git checkout FETCH_HEAD) && \
30     update-requirements -s --source /src/openstack-requirements /src/neutron-tempest-plugin && \
31     git init /src/intel-nfv-ci-tests && \
32     (cd /src/intel-nfv-ci-tests && \
33         git fetch --tags https://git.openstack.org/openstack/intel-nfv-ci-tests $INTEL_TAG && \
34         git checkout FETCH_HEAD) && \
35     update-requirements -s --source /src/openstack-requirements /src/intel-nfv-ci-tests && \
36     git init /src/barbican-tempest-plugin && \
37     (cd /src/barbican-tempest-plugin && \
38         git fetch --tags https://git.openstack.org/openstack/barbican-tempest-plugin.git $BARBICAN_TAG && \
39         git checkout FETCH_HEAD) && \
40     update-requirements -s --source /src/openstack-requirements /src/barbican-tempest-plugin/ && \
41     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
42         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin /src/intel-nfv-ci-tests \
43         networking-bgpvpn networking-sfc && \
44     rm -r upper-constraints.txt upper-constraints.opnfv.txt \
45         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin /src/intel-nfv-ci-tests && \
46     mkdir -p /home/opnfv/functest/data/refstack && \
47     wget "https://refstack.openstack.org/api/v1/guidelines/${REFSTACK_TARGET}/tests?target=compute&type=required&alias=true&flag=false" \
48         -O /home/opnfv/functest/data/refstack/defcore.txt && \
49     mkdir -p /etc/neutron /etc/glance && \
50     wget -q -O /etc/neutron/policy.json https://git.openstack.org/cgit/openstack/neutron/plain/etc/policy.json?h=$OPENSTACK_TAG && \
51     wget -q -O /etc/glance/policy.json https://git.openstack.org/cgit/openstack/glance/plain/etc/policy.json?h=$OPENSTACK_TAG && \
52     git clone --depth 1 -b $NEUTRON_RALLY_TAG https://git.openstack.org/openstack/neutron.git /src/neutron && \
53     (cd /src/neutron && git fetch --tags origin $NEUTRON_RALLY_TAG && git checkout FETCH_HEAD) && \
54     mkdir -p /home/opnfv/functest/data/rally/neutron && \
55     cp -r /src/neutron/rally-jobs /home/opnfv/functest/data/rally/neutron/rally-jobs && \
56     rm -r /src/neutron && \
57     apk del .build-deps
58 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
59 CMD ["run_tests", "-t", "all"]