6f1a5e65d65d0ce48c5deae60c732cef52307b54
[functest-kubernetes.git] / docker / cnf / Dockerfile
1 FROM opnfv/functest-kubernetes-core
2
3 ARG CNF_CONFORMANCE_TAG=v0.7.2-beta1
4 ARG HELM_TAG=v3.3.1
5
6 RUN apk --no-cache add --update wget curl libc6-compat && \
7     K8S_TAG=$(curl -s https://storage.googleapis.com/kubernetes-release/release/latest-1.19.txt)  && \
8     case $(uname -m) in armv7l) ARCH=arm;; aarch64) ARCH=arm64;; x86_64) ARCH=amd64;; esac && \
9     curl https://storage.googleapis.com/kubernetes-release/release/$K8S_TAG/bin/linux/$ARCH/kubectl \
10         -s --output /usr/local/bin/kubectl && \
11     curl https://get.helm.sh/helm-$HELM_TAG-linux-$ARCH.tar.gz \
12         -s --output /src/helm-$HELM_TAG-linux-$ARCH.tar.gz && \
13     tar zxf /src/helm-$HELM_TAG-linux-$ARCH.tar.gz linux-$ARCH/helm -C /src && \
14     mv /src/linux-$ARCH/helm /usr/local/bin && \
15     chmod +x /usr/local/bin/kubectl /usr/local/bin/helm && \
16     rm -r /src/helm-$HELM_TAG-linux-$ARCH.tar.gz /src/linux-$ARCH && \
17     case $(uname -m) in x86_64) \
18         curl https://github.com/cncf/cnf-conformance/releases/download/$CNF_CONFORMANCE_TAG/cnf-conformance-$(echo $CNF_CONFORMANCE_TAG |cut -d\- -f 1)-$ARCH-static \
19             -Ls --output /usr/local/bin/cnf-conformance && \
20             chmod +x /usr/local/bin/cnf-conformance ;; esac && \
21     mkdir -p /src/cnf-conformance && \
22     curl -Ls https://raw.githubusercontent.com/cncf/cnf-conformance/$CNF_CONFORMANCE_TAG/example-cnfs/coredns/cnf-conformance.yml \
23         -s --output /src/cnf-conformance/cnf-conformance.yml && \
24     curl -Ls https://raw.githubusercontent.com/cncf/cnf-conformance/$CNF_CONFORMANCE_TAG/points.yml \
25         -s --output /src/cnf-conformance/points.yml
26 COPY testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml
27 CMD ["run_tests", "-t", "all"]