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