Update Functest to OpenStack stable/pike
[functest.git] / docker / restapi / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=stable/pike
5 ARG ODL_TAG=master
6 ARG FDS_TAG=master
7 ARG REFSTACK_TAG=master
8 ARG VIMS_TAG=stable
9
10 COPY thirdparty-requirements.txt thirdparty-requirements.txt
11 RUN apk --no-cache add --update nodejs nodejs-npm python3 sshpass \
12         ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \
13         procps libxslt libxml2 zlib libffi && \
14     apk --no-cache add --virtual .build-deps --update \
15         python-dev python3-dev build-base linux-headers libffi-dev \
16         openssl-dev libjpeg-turbo-dev \
17         ruby-dev g++ make libxslt-dev libxml2-dev zlib-dev libffi-dev && \
18     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
19         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ | \
20         > upper-constraints.txt && \
21     git clone https://github.com/openstack/refstack-client.git /src/refstack-client && \
22     (cd src/refstack-client && git checkout $REFSTACK_TAG) && \
23     update-requirements -s --source /src/openstack-requirements /src/refstack-client/ && \
24     pip install --no-cache-dir --src /src -cupper-constraints.txt \
25         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
26         -e/src/refstack-client -rthirdparty-requirements.txt && \
27     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \
28         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
29         doctor-tests && \
30     git clone https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
31     (cd src/odl_test && git checkout $ODL_TAG) && \
32     git clone --depth 1 -b $FDS_TAG https://gerrit.opnfv.org/gerrit/fds /src/fds && \
33     git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test /src/vims-test && \
34     ln -s /src/tempest /src/refstack-client/.tempest && \
35     virtualenv --system-site-packages /src/tempest/.venv && \
36     # the next line must be uncommented as soon as promise is synced with pike
37     # (cd /src/promise/source && npm install) && \
38     (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
39     npm -g install npm@latest && \
40     rm -r upper-constraints.txt thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \
41         /src/fds/.git /src/vims-test/.git && \
42     apk del .build-deps
43 EXPOSE 5000
44 CMD ["functest_restapi"]