Update Cloudify images
[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=master
7 ARG NEUTRON_TAG=master
8 ARG BARBICAN_TAG=master
9
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 libxml2-dev libxslt-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:\\/\\/git.openstack.org\\/openstack\\/tempest#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 init /src/patrole && \
19     (cd /src/patrole && \
20         git fetch --tags https://git.openstack.org/openstack/patrole.git $PATROLE_TAG && \
21         git checkout FETCH_HEAD) && \
22     update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
23     git init /src/neutron-tempest-plugin && \
24     (cd /src/neutron-tempest-plugin && \
25         git fetch --tags https://git.openstack.org/openstack/neutron-tempest-plugin.git $NEUTRON_TAG && \
26         git checkout FETCH_HEAD) && \
27     update-requirements -s --source /src/openstack-requirements /src/neutron-tempest-plugin && \
28     git init /src/barbican-tempest-plugin && \
29     (cd /src/barbican-tempest-plugin && \
30         git fetch --tags https://git.openstack.org/openstack/barbican-tempest-plugin.git $BARBICAN_TAG && \
31         git checkout FETCH_HEAD) && \
32     update-requirements -s --source /src/openstack-requirements /src/barbican-tempest-plugin/ && \
33     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
34         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
35         networking-bgpvpn networking-sfc && \
36     mkdir -p /home/opnfv/functest/data/refstack && \
37     wget "https://refstack.openstack.org/api/v1/guidelines/${REFSTACK_TARGET}/tests?target=compute&type=required&alias=true&flag=false" \
38         -O /home/opnfv/functest/data/refstack/defcore.txt && \
39     mkdir -p /etc/neutron /etc/cinder /etc/glance /etc/keystone /etc/nova && \
40     wget -q -O /etc/glance/policy.json https://git.openstack.org/cgit/openstack/glance/plain/etc/policy.json?h=$OPENSTACK_TAG && \
41     virtualenv --no-pip --no-setuptools --no-wheel oslo && . oslo/bin/activate && \
42     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
43         oslo.policy -e git+https://git.openstack.org/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron \
44         -e git+https://git.openstack.org/openstack/cinder.git@$OPENSTACK_TAG#egg=cinder \
45         -e git+https://git.openstack.org/openstack/keystone.git@$OPENSTACK_TAG#egg=keystone \
46         -e git+https://git.openstack.org/openstack/nova.git@$OPENSTACK_TAG#egg=nova && \
47     oslopolicy-sample-generator  --format json --output-file /etc/cinder/policy.json --namespace cinder && \
48     oslopolicy-sample-generator  --format json --output-file /etc/keystone/policy.json --namespace keystone && \
49     oslopolicy-sample-generator  --format json --output-file /etc/neutron/policy.json --namespace neutron && \
50     oslopolicy-sample-generator  --format json --output-file /etc/nova/policy.json --namespace nova && \
51     deactivate && \
52     mkdir -p /home/opnfv/functest/data/rally/neutron && \
53     cp -r /src/neutron/rally-jobs /home/opnfv/functest/data/rally/neutron/rally-jobs && \
54     rm -r oslo upper-constraints.txt upper-constraints.opnfv.txt \
55         /src/neutron /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin && \
56     apk del .build-deps
57 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
58 CMD ["run_tests", "-t", "all"]