From 5e9b2b269d7f53da13ac45923fcabcb5264850b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Fri, 10 Jun 2022 17:46:25 +0200 Subject: [PATCH] ci: Regroup tests in qemu & metal buckets - Only build the ostree aci container archive in the build step as it's the only artifact used for the layering test. - Group the remaining tests in two buckets: qemu & metal. - Disable the now uneeded tests. --- ci/prow-entrypoint.sh | 52 ++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/ci/prow-entrypoint.sh b/ci/prow-entrypoint.sh index 1f974974..45fc9488 100755 --- a/ci/prow-entrypoint.sh +++ b/ci/prow-entrypoint.sh @@ -42,9 +42,11 @@ cosa_init() { cosa init --transient "${tmp_src}/os" } -# Do a cosa build & cosa build-extensions only +# Do a cosa build & cosa build-extensions only. # This is called both as part of the build phase and test phase in Prow thus we # can not do any kola testing in this function. +# We do not build the QEMU image here as we don't need it in the pure container +# test case. cosa_build() { # Grab the raw value of `mutate-os-release` and use sed to convert the value # to X-Y format @@ -61,32 +63,28 @@ cosa_build() { ls -alh "src/config/" curl -L "http://base-${ocpver_mut}-rhel${rhelver}.ocp.svc.cluster.local" -o "src/config/ocp.repo" - # Build RHCOS & extensions + # Fetch packages cosa fetch - cosa build + # Only build the ostree image by default + cosa build ostree + # Build extensions cosa buildextend-extensions } -# Make sure the image is at least booting before runnning expensive tests -kola_test_basic() { - cosa kola run basic -} - -kola_test_basic_scenarios() { +# Build QEMU image and run all kola tests +kola_test_qemu() { + cosa buildextend-qemu cosa kola --basic-qemu-scenarios -} - -kola_test_upgrade() { kola run-upgrade -b rhcos -v --find-parent-image --qemu-image-dir tmp/ --output-dir tmp/kola-upgrade -} - -kola_test_run() { cosa kola run --parallel 2 } +# Build metal, metal4k & live images and run kola tests kola_test_metal() { # Build metal + installer now so we can test them - cosa buildextend-metal && cosa buildextend-metal4k && cosa buildextend-live + cosa buildextend-metal + cosa buildextend-metal4k + cosa buildextend-live # Compress the metal and metal4k images now so we're testing # installs with the image format we ship @@ -160,30 +158,18 @@ main () { setup_user cosa_init cosa_build - kola_test_basic - kola_test_basic_scenarios + kola_test_qemu ;; "build-test-qemu-kola-all") setup_user cosa_init cosa_build - kola_test_basic - kola_test_run - ;; - "build-test-qemu-kola-upgrade") - setup_user - cosa_init - cosa_build - kola_test_basic - kola_test_upgrade - ;; - "build-test-qemu-kola-metal") - setup_user - cosa_init - cosa_build - kola_test_basic kola_test_metal ;; + "build-test-qemu-kola-upgrade" | "build-test-qemu-kola-metal") + echo "Disabled tests" + exit 0 + ;; *) echo "Unknown test name" exit 1