mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-20 11:21:49 +00:00
ci: run eks, ecs and rds nightly in dedicated cells (#984)
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Prepare a runner to build a guest image with build-system-image.sh.
|
||||
#
|
||||
# Installs libguestfs + qemu-utils if they are missing and makes a host kernel
|
||||
# readable, so the libguestfs appliance can boot. Nothing here touches a host
|
||||
# block device: virt-customize works inside an isolated userspace appliance, so
|
||||
# this is safe on a shared runner.
|
||||
#
|
||||
# Callers must still export LIBGUESTFS_BACKEND=direct themselves — it has to be
|
||||
# set in the environment the build runs in, which is not this subshell.
|
||||
set -euo pipefail
|
||||
|
||||
# Three nightly service cells share one ci-single runner and start together, so
|
||||
# concurrent apt-get runs are the normal case rather than the exception. Two of
|
||||
# them lost the lock outright before this guard existed. Skipping the install
|
||||
# when the tools are already present avoids most of the contention; the lock
|
||||
# timeout covers the rest, including apt runs started by anything else on the
|
||||
# box.
|
||||
if command -v virt-customize >/dev/null && command -v qemu-img >/dev/null; then
|
||||
echo "libguestfs-tools and qemu-utils already present"
|
||||
else
|
||||
APT_OPTS=(-o DPkg::Lock::Timeout=600)
|
||||
sudo apt-get "${APT_OPTS[@]}" update -qq
|
||||
sudo apt-get "${APT_OPTS[@]}" install -y --no-install-recommends \
|
||||
libguestfs-tools qemu-utils
|
||||
fi
|
||||
|
||||
# Debian/Ubuntu ship /boot/vmlinuz-* mode 0600 and the appliance needs to read a
|
||||
# host kernel. Tolerated on failure: a runner whose kernel is already readable
|
||||
# has no vmlinuz to chmod under some images.
|
||||
sudo chmod 0644 /boot/vmlinuz-* || true
|
||||
@@ -37,12 +37,14 @@ E2E_SUITES_MULTI="multinode lb cert quota"
|
||||
E2E_SUITES_SINGLE_RE="$(printf '%s' "${E2E_SUITES_SINGLE}" | tr ' ' '|')"
|
||||
E2E_SUITES_MULTI_RE="$(printf '%s' "${E2E_SUITES_MULTI}" | tr ' ' '|')"
|
||||
|
||||
# e2e-nightly runs a narrower set than the two sets above, deliberately: its
|
||||
# ~19 cells each have a 35-minute budget and exist to prove that every
|
||||
# install / network / host-OS permutation boots and serves. Suite breadth is
|
||||
# the PR gate's job, and it already runs on every push. These are subsets, and
|
||||
# e2e_suites_assert_subset below enforces that.
|
||||
E2E_SUITES_NIGHTLY_SINGLE="single cert"
|
||||
# What every e2e-nightly permutation cell must prove, deliberately narrower
|
||||
# than the two sets above: those cells have a 35-minute budget and exist to show
|
||||
# that every install / network / host-OS combination boots and serves. The
|
||||
# service suites are not deferred to the PR gate — eks, ecs and rds each run
|
||||
# nightly in their own dedicated cell, because each needs a guest AMI built
|
||||
# first and a service failure should not mask whether a host OS boots. These
|
||||
# are subsets, and e2e_suites_assert_subset below enforces that.
|
||||
E2E_SUITES_NIGHTLY_SINGLE="single cert iam"
|
||||
E2E_SUITES_NIGHTLY_MULTI="multinode cert lb"
|
||||
|
||||
# Fail loudly when a narrowed list names a suite its topology cannot run. This
|
||||
|
||||
Reference in New Issue
Block a user