1 FROM opnfv/functest-tempest
4 ARG OPENSTACK_TAG=master
5 ARG REFSTACK_TARGET=2018.11
7 ARG NEUTRON_TEMPEST_TAG=master
8 ARG BARBICAN_TAG=master
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 case $(uname -m) in aarch*|arm*) sed -i -E /^PyNaCl=/d upper-constraints.txt ;; esac && \
16 wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH > upper-constraints.opnfv.txt && \
17 sed -i -E /#egg=functest/d upper-constraints.opnfv.txt && \
18 git init /src/patrole && \
20 git fetch --tags https://opendev.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_TEMPEST_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://opendev.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 pip3 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 mkdir -p /etc/neutron /etc/cinder /etc/glance /etc/keystone /etc/nova && \
38 wget -q -O /etc/glance/policy.json https://opendev.org/openstack/glance/raw/branch/$OPENSTACK_TAG/etc/policy.json && \
39 virtualenv --no-pip --no-setuptools --no-wheel oslo && . oslo/bin/activate && \
40 pip3 install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
41 oslo.policy -e git+https://opendev.org/openstack/neutron.git@$OPENSTACK_TAG#egg=neutron && \
42 oslopolicy-sample-generator --format json --output-file /etc/neutron/policy.json --namespace neutron && \
44 rm -r oslo upper-constraints.txt upper-constraints.opnfv.txt \
45 /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
48 COPY compute.txt /home/opnfv/functest/data/refstack/compute.txt
49 COPY object.txt /home/opnfv/functest/data/refstack/object.txt
50 COPY platform.txt /home/opnfv/functest/data/refstack/platform.txt
51 COPY testcases.yaml /usr/lib/python3.6/site-packages/xtesting/ci/testcases.yaml
52 CMD ["run_tests", "-t", "all"]