From fa04f8d54ec0a4e69b948a9e55a0b54ecba6601a Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Mon, 8 Jun 2020 16:07:12 -0700 Subject: [PATCH 1/3] ci: Run k8s tests with containerd in a dedicated Jenkins job for clh This patch separates the k8s tests using containerd from the main CI job of cloud-hypervisor ("CLOUD-HYPERVISOR") into a dedicated Jenkins job. It provides better modularity and maintainability, especially for adding a new Jenkins job to run k8s tests with cri-o. Signed-off-by: Bo Chen --- .ci/jenkins_job_build.sh | 8 ++++++++ .ci/run.sh | 13 +++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.ci/jenkins_job_build.sh b/.ci/jenkins_job_build.sh index 8d947ddbc..dc5b464f9 100755 --- a/.ci/jenkins_job_build.sh +++ b/.ci/jenkins_job_build.sh @@ -253,6 +253,14 @@ case "${CI_JOB}" in export TEST_DOCKER="true" export experimental_kernel="true" ;; +"CLOUD-HYPERVISOR-K8S-CONTAINERD") + init_ci_flags + export CRI_CONTAINERD="yes" + export CRI_RUNTIME="containerd" + export KATA_HYPERVISOR="cloud-hypervisor" + export KUBERNETES="yes" + export experimental_kernel="true" + ;; "CLOUD-HYPERVISOR-K8S-E2E-CRIO-MINIMAL") init_ci_flags export CRIO="yes" diff --git a/.ci/run.sh b/.ci/run.sh index ff6ed3ede..0087a86e0 100755 --- a/.ci/run.sh +++ b/.ci/run.sh @@ -47,12 +47,6 @@ case "${CI_JOB}" in sudo -E PATH="$PATH" bash -c "make crio" ;; "CLOUD-HYPERVISOR") - echo "INFO: Containerd checks" - sudo -E PATH="$PATH" bash -c "make cri-containerd" - - echo "INFO: Running kubernetes tests" - sudo -E PATH="$PATH" bash -c "make kubernetes" - echo "INFO: Running soak test" sudo -E PATH="$PATH" bash -c "make docker-stability" @@ -74,6 +68,13 @@ END echo "INFO: Running podman integration tests" bash -c "make podman" ;; + "CLOUD-HYPERVISOR-K8S-CONTAINERD") + echo "INFO: Containerd checks" + sudo -E PATH="$PATH" bash -c "make cri-containerd" + + echo "INFO: Running kubernetes tests with containerd" + sudo -E PATH="$PATH" bash -c "make kubernetes" + ;; "CLOUD-HYPERVISOR-K8S-E2E-CRIO-MINIMAL") sudo -E PATH="$PATH" bash -c "make kubernetes-e2e" ;; From 0f4cd05151bed235de0473e99a847985d4cd453f Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Mon, 8 Jun 2020 16:23:02 -0700 Subject: [PATCH 2/3] ci: Add k8s tests using crio for cloud-hypervisor This patch extends the existing scripts to cover a new Jenkins job on testing k8s with crio for cloud-hypervisor. Fixes: #2546 Signed-off-by: Bo Chen --- .ci/jenkins_job_build.sh | 9 +++++++++ .ci/run.sh | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/.ci/jenkins_job_build.sh b/.ci/jenkins_job_build.sh index dc5b464f9..ebaf434ad 100755 --- a/.ci/jenkins_job_build.sh +++ b/.ci/jenkins_job_build.sh @@ -261,6 +261,15 @@ case "${CI_JOB}" in export KUBERNETES="yes" export experimental_kernel="true" ;; +"CLOUD-HYPERVISOR-K8S-CRIO") + init_ci_flags + export CRIO="yes" + export CRI_RUNTIME="crio" + export KATA_HYPERVISOR="cloud-hypervisor" + export KUBERNETES="yes" + export TEST_CRIO="true" + export experimental_kernel="true" + ;; "CLOUD-HYPERVISOR-K8S-E2E-CRIO-MINIMAL") init_ci_flags export CRIO="yes" diff --git a/.ci/run.sh b/.ci/run.sh index 0087a86e0..ffdfa8a19 100755 --- a/.ci/run.sh +++ b/.ci/run.sh @@ -75,6 +75,13 @@ END echo "INFO: Running kubernetes tests with containerd" sudo -E PATH="$PATH" bash -c "make kubernetes" ;; + "CLOUD-HYPERVISOR-K8S-CRIO") + echo "INFO: Running crio tests" + sudo -E PATH="$PATH" bash -c "make crio" + + echo "INFO: Running kubernetes tests with cri-o" + sudo -E PATH="$PATH" bash -c "make kubernetes" + ;; "CLOUD-HYPERVISOR-K8S-E2E-CRIO-MINIMAL") sudo -E PATH="$PATH" bash -c "make kubernetes-e2e" ;; From 204cd6667c311fd8f6987d0a2f398c3281551048 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Wed, 15 Jul 2020 20:43:48 -0700 Subject: [PATCH 3/3] cri-o: Skip one test for clh Skipped test: "privileged ctr device add" Signed-off-by: Bo Chen --- integration/cri-o/crio_skip_tests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/cri-o/crio_skip_tests.sh b/integration/cri-o/crio_skip_tests.sh index ebfd2b1a4..48d122b98 100755 --- a/integration/cri-o/crio_skip_tests.sh +++ b/integration/cri-o/crio_skip_tests.sh @@ -22,4 +22,8 @@ if [ "${KATA_HYPERVISOR}" == "firecracker" ]; then skipCRIOTests+=( 'test "privileged ctr device add"' ) +elif [ "${KATA_HYPERVISOR}" == "cloud-hypervisor" ]; then + skipCRIOTests+=( + 'test "privileged ctr device add"' + ) fi