diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-02-04 12:57:09 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-02-04 12:57:09 +0100 |
commit | 0163bb977604a32a0c46e10a97313ce0feea7b5f (patch) | |
tree | 64c695d90cea5f49c91960c7bf02b89084d4337a | |
parent | 08558d2f47f7400176ad678ceaaff1b5be0b931c (diff) |
Allow parameterizing K8s versions
ONAP integration team asks to support all K8s versions.
A couple of OPNFV releases will allow testing 2 K8s versions.
Change-Id: Idb43cff0cc03cc9c17b290f7f1867e2c380c6319
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | docker/cnf/Dockerfile | 17 | ||||
-rw-r--r-- | docker/healthcheck/Dockerfile | 16 |
2 files changed, 18 insertions, 15 deletions
diff --git a/docker/cnf/Dockerfile b/docker/cnf/Dockerfile index 04a6de68..60e0cfbf 100644 --- a/docker/cnf/Dockerfile +++ b/docker/cnf/Dockerfile @@ -1,19 +1,20 @@ FROM opnfv/functest-kubernetes-core +ARG K8S_TAG=latest ARG CNF_CONFORMANCE_TAG=v0.9.19 ARG HELM_TAG=v3.3.1 RUN apk --no-cache add --update wget curl libc6-compat && \ - K8S_TAG=$(curl -s https://storage.googleapis.com/kubernetes-release/release/latest.txt) && \ - case $(uname -m) in armv7l) ARCH=arm;; aarch64) ARCH=arm64;; x86_64) ARCH=amd64;; esac && \ - curl https://storage.googleapis.com/kubernetes-release/release/$K8S_TAG/bin/linux/$ARCH/kubectl \ + tag=$(curl -s https://storage.googleapis.com/kubernetes-release/release/$K8S_TAG.txt) && \ + case $(uname -m) in armv7l) arch=arm;; aarch64) arch=arm64;; x86_64) arch=amd64;; esac && \ + curl https://storage.googleapis.com/kubernetes-release/release/$tag/bin/linux/$arch/kubectl \ --output /usr/local/bin/kubectl && \ - curl https://get.helm.sh/helm-$HELM_TAG-linux-$ARCH.tar.gz \ - --output /src/helm-$HELM_TAG-linux-$ARCH.tar.gz && \ - tar zxf /src/helm-$HELM_TAG-linux-$ARCH.tar.gz linux-$ARCH/helm -C /src && \ - mv /src/linux-$ARCH/helm /usr/local/bin && \ + curl https://get.helm.sh/helm-$HELM_TAG-linux-$arch.tar.gz \ + --output /src/helm-$HELM_TAG-linux-$arch.tar.gz && \ + tar zxf /src/helm-$HELM_TAG-linux-$arch.tar.gz linux-$arch/helm -C /src && \ + mv /src/linux-$arch/helm /usr/local/bin && \ chmod +x /usr/local/bin/kubectl /usr/local/bin/helm && \ - rm -r /src/helm-$HELM_TAG-linux-$ARCH.tar.gz /src/linux-$ARCH && \ + rm -r /src/helm-$HELM_TAG-linux-$arch.tar.gz /src/linux-$arch && \ case $(uname -m) in x86_64) \ curl https://github.com/cncf/cnf-conformance/releases/download/$CNF_CONFORMANCE_TAG/cnf-conformance-$CNF_CONFORMANCE_TAG.tar.gz \ -L --output /src/cnf-conformance-$CNF_CONFORMANCE_TAG.tar.gz && \ diff --git a/docker/healthcheck/Dockerfile b/docker/healthcheck/Dockerfile index 40612a5e..0a8069a0 100644 --- a/docker/healthcheck/Dockerfile +++ b/docker/healthcheck/Dockerfile @@ -1,15 +1,17 @@ FROM opnfv/functest-kubernetes-core +ARG K8S_TAG=latest + RUN apk --no-cache add --update curl libc6-compat && \ - K8S_TAG=$(curl -s https://storage.googleapis.com/kubernetes-release/release/latest.txt) && \ - case $(uname -m) in armv7l) ARCH=arm;; aarch64) ARCH=arm64;; x86_64) ARCH=amd64;; esac && \ - curl https://storage.googleapis.com/kubernetes-release/release/$K8S_TAG/bin/linux/$ARCH/kubectl \ + tag=$(curl -s https://storage.googleapis.com/kubernetes-release/release/$K8S_TAG.txt) && \ + case $(uname -m) in armv7l) arch=arm;; aarch64) arch=arm64;; x86_64) arch=amd64;; esac && \ + curl https://storage.googleapis.com/kubernetes-release/release/$tag/bin/linux/$arch/kubectl \ -s --output /usr/local/bin/kubectl && \ - curl https://storage.googleapis.com/kubernetes-release/release/$K8S_TAG/kubernetes-test-linux-$ARCH.tar.gz \ - -s --output /src/kubernetes-test-linux-$ARCH.tar.gz && \ - tar zxf /src/kubernetes-test-linux-$ARCH.tar.gz kubernetes/test/bin/e2e.test kubernetes/test/bin/ginkgo -C /src && \ + curl https://storage.googleapis.com/kubernetes-release/release/$tag/kubernetes-test-linux-$arch.tar.gz \ + -s --output /src/kubernetes-test-linux-$arch.tar.gz && \ + tar zxf /src/kubernetes-test-linux-$arch.tar.gz kubernetes/test/bin/e2e.test kubernetes/test/bin/ginkgo -C /src && \ mv /src/kubernetes/test/bin/e2e.test /src/kubernetes/test/bin/ginkgo /usr/local/bin/ && \ chmod +x /usr/local/bin/kubectl /usr/local/bin/e2e.test /usr/local/bin/ginkgo && \ - rm -r /src/kubernetes /src/kubernetes-test-linux-$ARCH.tar.gz + rm -r /src/kubernetes /src/kubernetes-test-linux-$arch.tar.gz COPY testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml CMD ["run_tests", "-t", "all"] |