From 1f997a66f658ff11809f44f4630fc678eb091b83 Mon Sep 17 00:00:00 2001 From: mrichomme Date: Tue, 10 Dec 2019 08:47:28 +0100 Subject: Move integration xtesting Dockerfile to ONAP All the Dockerfiles and xtesting configurations were hosted in gitlab.com [1] The goal of this patch is to host these assets in ONAP A jenkins jjb shall be created to generated the docker and push them on the nexus (today the built-in registry of ONAP was used) These xtesting dockers are referencing integration categories [2] and integration use cases [3] These xtesting dockers shall also simplify the way to integrate new use cases in any CI chain (jenkins or gitlab-ci based) [1]: https://gitlab.com/Orange-OpenSource/lfn/onap/integration/xtesting [2]: https://wiki.onap.org/pages/viewpage.action?pageId=71835330 [3]: http://testresults.opnfv.org/onap/api/v1/projects/integration/cases Issue-ID: INT-1366 Signed-off-by: mrichomme Change-Id: Iba0fc0b0415731a7a81ba0225a70ae16391dd129 Signed-off-by: mrichomme --- infra-healthcheck/docker/Dockerfile | 31 +++++++++++++++++++++++++++++++ infra-healthcheck/docker/testcases.yaml | 29 +++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 infra-healthcheck/docker/Dockerfile create mode 100644 infra-healthcheck/docker/testcases.yaml (limited to 'infra-healthcheck/docker') diff --git a/infra-healthcheck/docker/Dockerfile b/infra-healthcheck/docker/Dockerfile new file mode 100644 index 0000000..de19a2a --- /dev/null +++ b/infra-healthcheck/docker/Dockerfile @@ -0,0 +1,31 @@ +FROM opnfv/xtesting + +ARG KUBERNETES_VERSION="v1.15.2" +ARG HELM_VERSION="v2.14.1" +ARG ONAP_TESTS_TAG=master + +# Install kubectl +# Note: Latest version may be found on: +# https://aur.archlinux.org/packages/kubectl-bin/ + +ADD https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl + +COPY scripts/check_onap_k8s.sh /check_onap_k8s.sh +COPY scripts/check_onap_helm.sh /check_onap_helm.sh + +RUN set -x && \ + apk --no-cache add --update curl ca-certificates && \ + apk --no-cache add --virtual .build-deps --update \ + gcc python3-dev musl-dev && \ + chmod +x /usr/local/bin/kubectl && \ + adduser kubectl -Du 2342 -h /config && \ + wget https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm && \ + chmod +x /usr/local/bin/helm && \ + chmod +x /check_onap_*.sh && \ + pip3 install --upgrade pip && \ + pip3 install --no-cache-dir \ + git+https://gitlab.com/Orange-OpenSource/lfn/onap/integration/xtesting.git@$ONAP_TESTS_TAG#subdirectory=infra-healthcheck && \ + apk del .build-deps + +COPY docker/testcases.yaml /usr/lib/python3.7/site-packages/xtesting/ci/testcases.yaml +CMD ["run_tests", "-t", "all"] diff --git a/infra-healthcheck/docker/testcases.yaml b/infra-healthcheck/docker/testcases.yaml new file mode 100644 index 0000000..fb30c85 --- /dev/null +++ b/infra-healthcheck/docker/testcases.yaml @@ -0,0 +1,29 @@ +--- +tiers: + - + name: infra-healthcheck + order: 1 + ci_loop: '(daily)|(weekly)!(gating)' + description: >- + Set of basic k8s Functional tests to validate the ONAP installation. + testcases: + - + case_name: onap-k8s + project_name: integration + criteria: 100 + blocking: false + description: >- + This test case verifies that the ONAP pods are all Running + and shows the pods, deployments, svc and events + run: + name: 'onap_k8s' + - + case_name: onap-helm + project_name: integration + criteria: 100 + blocking: false + description: >- + This test case verifies that the ONAP charts are in + DEPLOYED status + run: + name: 'onap_helm' -- cgit 1.2.3-korg