e28e9ec78c76acb50706ce231610cab7a2b662c7
[functest.git] / docker / smoke / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=master
5 ARG REFSTACK_TARGET=2018.11
6 ARG PATROLE_TAG=master
7 ARG NEUTRON_TEMPEST_TAG=master
8 ARG CINDER_TEMPEST_TAG=master
9 ARG BARBICAN_TAG=master
10 ARG OCTAVIA_TAG=master
11
12 RUN apk --no-cache add --update libxml2 libxslt && \
13     apk --no-cache add --virtual .build-deps --update \
14         python3-dev build-base linux-headers libffi-dev \
15         openssl-dev libjpeg-turbo-dev libxml2-dev libxslt-dev && \
16     wget -q -O- https://opendev.org/openstack/requirements/raw/branch/$OPENSTACK_TAG/upper-constraints.txt > upper-constraints.txt && \
17     sed -i -E /^tempest==+.*$/d upper-constraints.txt && \
18     case $(uname -m) in aarch*|arm*) sed -i -E /^PyNaCl=/d upper-constraints.txt ;; esac && \
19     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH > upper-constraints.opnfv.txt && \
20     sed -i -E /#egg=functest/d upper-constraints.opnfv.txt && \
21     git init /src/patrole && \
22     (cd /src/patrole && \
23         git fetch --tags https://opendev.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_TEMPEST_TAG && \
29         git checkout FETCH_HEAD) && \
30     update-requirements -s --source /src/openstack-requirements /src/neutron-tempest-plugin && \
31     git init /src/cinder-tempest-plugin && \
32     (cd /src/cinder-tempest-plugin && \
33         git fetch --tags https://git.openstack.org/openstack/cinder-tempest-plugin.git $CINDER_TEMPEST_TAG && \
34         git checkout FETCH_HEAD) && \
35     update-requirements -s --source /src/openstack-requirements /src/cinder-tempest-plugin && \
36     git init /src/barbican-tempest-plugin && \
37     (cd /src/barbican-tempest-plugin && \
38         git fetch --tags https://opendev.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     git init /src/octavia-tempest-plugin && \
42     (cd /src/octavia-tempest-plugin && \
43         git fetch --tags https://git.openstack.org/openstack/octavia-tempest-plugin.git $OCTAVIA_TAG && \
44         git checkout FETCH_HEAD) && \
45     update-requirements -s --source /src/openstack-requirements /src/octavia-tempest-plugin && \
46     pip3 install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
47         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
48         /src/cinder-tempest-plugin \
49         /src/octavia-tempest-plugin && \
50     mkdir -p /home/opnfv/functest/data/refstack && \
51     mkdir -p /etc/neutron /etc/cinder /etc/glance /etc/keystone /etc/nova && \
52     wget -q -O /etc/glance/policy.json https://opendev.org/openstack/glance/raw/branch/$OPENSTACK_TAG/etc/policy.json && \
53     virtualenv --no-pip --no-setuptools --no-wheel oslo && . oslo/bin/activate && \
54     pip3 install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
55         oslo.policy -e git+https://opendev.org/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron && \
56     oslopolicy-sample-generator  --format json --output-file /etc/neutron/policy.json --namespace neutron && \
57     deactivate && \
58     rm -r oslo upper-constraints.txt upper-constraints.opnfv.txt \
59         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
60         /src/cinder-tempest-plugin \
61         /src/octavia-tempest-plugin /src/neutron && \
62     apk del .build-deps
63 COPY compute.txt /home/opnfv/functest/data/refstack/compute.txt
64 COPY object.txt /home/opnfv/functest/data/refstack/object.txt
65 COPY platform.txt /home/opnfv/functest/data/refstack/platform.txt
66 COPY testcases.yaml /usr/lib/python3.7/site-packages/xtesting/ci/testcases.yaml
67 CMD ["run_tests", "-t", "all"]