Skip to content

Commit

Permalink
ci: Regroup tests in qemu & metal buckets
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
travier committed Jun 13, 2022
1 parent 787d5da commit 5e9b2b2
Showing 1 changed file with 19 additions and 33 deletions.
52 changes: 19 additions & 33 deletions ci/prow-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5e9b2b2

Please sign in to comment.