Update and enable Cloudify-based testcases
[functest.git] / docker / vnf / Dockerfile
1 FROM opnfv/functest-core
2
3 ARG BRANCH=master
4 ARG OPENSTACK_TAG=master
5 ARG VIMS_TEST_TAG=release-130
6 ARG QUAFF_TAG=59213d6d8ee29433552bb75f505cdc96b0b18909
7 ARG CLOUDIFY_VIMS_TAG=gambia
8 ARG HEAT_VIMS_TAG=release-130
9 ARG VROUTER_TAG=fraser
10 ARG VROUTER_BP_TAG=b16be2bfc4acabfec015300d294762b2da56c3a8
11 ARG JUJU_TAG=tags/juju-2.3.9
12 ARG JUJU_WAIT_TAG=2.6.4
13 ARG ABOT_CHARM=opnfv-fraser
14 ARG GODEPS_TAG=404a7e748cd352bb0d7449dedc645546eebbfc6e
15
16 ENV GOPATH /src/epc-requirements/go
17 ENV GOBIN /src/epc-requirements/go/bin
18 ENV PATH $GOBIN:$PATH
19
20 RUN apk --no-cache add --update \
21         ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \
22         procps libxslt libxml2 zlib libffi python3 go musl-dev && \
23     apk --no-cache add --virtual .build-deps --update \
24         ruby-dev g++ make libxslt-dev libxml2-dev zlib-dev libffi-dev g++ make && \
25     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
26         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/git.openstack.org\\/openstack\\/tempest@\\1#egg=tempest/ \
27         > upper-constraints.txt && \
28     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH | \
29         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
30     git clone --depth 1 -b $VIMS_TEST_TAG https://github.com/Metaswitch/clearwater-live-test /src/vims-test && \
31     sed -i s/unf_ext\ \(.*\)/unf_ext\ \(0.0.7.4\)/g /src/vims-test/Gemfile.lock && \
32     git init /src/vims-test/quaff && \
33     (cd /src/vims-test/quaff && \
34         git fetch --tags https://github.com/Metaswitch/quaff $QUAFF_TAG && \
35         git checkout FETCH_HEAD) && \
36     git init /src/vims-test/build-infra && \
37     (cd /src/vims-test/build-infra && \
38         git fetch --tags https://github.com/Metaswitch/clearwater-build-infra $VIMS_TEST_TAG && \
39         git checkout FETCH_HEAD) && \
40     git init /src/cloudify_vims && \
41     (cd /src/cloudify_vims && \
42         git fetch --tags https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater.git $CLOUDIFY_VIMS_TAG && \
43         git checkout FETCH_HEAD) && \
44     git init  /src/heat_vims && \
45     (cd /src/heat_vims && \
46         git fetch --tags https://github.com/Metaswitch/clearwater-heat.git $HEAT_VIMS_TAG && \
47         git checkout FETCH_HEAD) && \
48     git init /src/opnfv-vnf-vyos-blueprint && \
49     (cd /src/opnfv-vnf-vyos-blueprint && \
50         git fetch --tags https://github.com/oolorg/opnfv-vnf-vyos-blueprint.git $VROUTER_BP_TAG && \
51         git checkout FETCH_HEAD) && \
52     mkdir -p /home/opnfv/functest/data/router && \
53     git init /home/opnfv/functest/data/router/opnfv-vnf-data && \
54     (cd /home/opnfv/functest/data/router/opnfv-vnf-data && \
55         git fetch --tags https://github.com/oolorg/opnfv-vnf-data.git $VROUTER_TAG && \
56         git checkout FETCH_HEAD) && \
57     git init /src/epc-requirements/abot_charm && \
58     (cd /src/epc-requirements/abot_charm && \
59         git fetch --tags https://github.com/RebacaInc/abot_charm.git $ABOT_CHARM && \
60         git checkout FETCH_HEAD) && \
61     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
62         juju-wait==$JUJU_WAIT_TAG && \
63     go get -d github.com/rogpeppe/godeps && \
64     (cd $GOPATH/src/github.com/rogpeppe/godeps && git checkout $GODEPS_TAG && go install -v github.com/rogpeppe/godeps) && \
65     go get -d -v github.com/juju/juju/... || true && \
66     (cd $GOPATH/src/github.com/juju/juju && git checkout $JUJU_TAG && godeps -u dependencies.tsv) && \
67     go install -v github.com/juju/juju/... && \
68     rm -r $GOPATH/src/ $GOPATH/pkg && \
69     (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
70     rm -r upper-constraints.txt upper-constraints.opnfv.txt /src/vims-test/.git /src/cloudify_vims/.git /src/heat_vims/.git /src/vims-test/quaff/.git \
71         /src/vims-test/build-infra/.git /src/opnfv-vnf-vyos-blueprint/.git \
72         /src/epc-requirements/abot_charm/.git && \
73     apk del .build-deps
74 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
75 CMD ["run_tests", "-t", "all"]