Fix python version
[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.11
6 ARG PATROLE_TAG=master
7 ARG NEUTRON_TEMPEST_TAG=master
8 ARG BARBICAN_TAG=master
9
10 RUN apk --no-cache add --virtual .build-deps --update \
11         python3-dev build-base linux-headers libffi-dev \
12         openssl-dev libjpeg-turbo-dev libxml2-dev libxslt-dev && \
13     wget -q -O- https://opendev.org/openstack/requirements/raw/branch/$OPENSTACK_TAG/upper-constraints.txt > upper-constraints.txt && \
14     sed -i -E s/^tempest==+.*$/-e\ git+https:\\/\\/opendev.org\\/openstack\\/tempest#egg=tempest/ upper-constraints.txt && \
15     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH > upper-constraints.opnfv.txt && \
16     sed -i -E /#egg=functest/d upper-constraints.opnfv.txt && \
17     git init /src/patrole && \
18     (cd /src/patrole && \
19         git fetch --tags https://opendev.org/openstack/patrole.git $PATROLE_TAG && \
20         git checkout FETCH_HEAD) && \
21     update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
22     git init /src/neutron-tempest-plugin && \
23     (cd /src/neutron-tempest-plugin && \
24         git fetch --tags https://git.openstack.org/openstack/neutron-tempest-plugin.git $NEUTRON_TEMPEST_TAG && \
25         git checkout FETCH_HEAD) && \
26     update-requirements -s --source /src/openstack-requirements /src/neutron-tempest-plugin && \
27     git init /src/barbican-tempest-plugin && \
28     (cd /src/barbican-tempest-plugin && \
29         git fetch --tags https://opendev.org/openstack/barbican-tempest-plugin.git $BARBICAN_TAG && \
30         git checkout FETCH_HEAD) && \
31     update-requirements -s --source /src/openstack-requirements /src/barbican-tempest-plugin/ && \
32     pip3 install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
33         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
34         networking-bgpvpn networking-sfc && \
35     mkdir -p /home/opnfv/functest/data/refstack && \
36     mkdir -p /etc/neutron /etc/cinder /etc/glance /etc/keystone /etc/nova && \
37     wget -q -O /etc/glance/policy.json https://opendev.org/openstack/glance/raw/branch/$OPENSTACK_TAG/etc/policy.json && \
38     virtualenv --no-pip --no-setuptools --no-wheel oslo && . oslo/bin/activate && \
39     pip3 install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
40         oslo.policy -e git+https://opendev.org/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron && \
41     oslopolicy-sample-generator  --format json --output-file /etc/neutron/policy.json --namespace neutron && \
42     deactivate && \
43     rm -r oslo upper-constraints.txt upper-constraints.opnfv.txt \
44         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
45         /src/neutron && \
46     apk del .build-deps
47 COPY compute.txt /home/opnfv/functest/data/refstack/compute.txt
48 COPY object.txt /home/opnfv/functest/data/refstack/object.txt
49 COPY platform.txt /home/opnfv/functest/data/refstack/platform.txt
50 COPY testcases.yaml /usr/lib/python3.6/site-packages/xtesting/ci/testcases.yaml
51 CMD ["run_tests", "-t", "all"]