- Introduce a GitHub Actions matrix for `test-container` and `test-e2e` to run against arch, debian, ubuntu, fedora, and centos - Run unit and integration tests only in the Arch container by passing `distro="arch"` via make in the corresponding workflows - Replace the global DISTROS loop with a single `distro` variable in the Makefile, defaulting to `arch`, and export it for all scripts - Update build scripts (build-image, build-image-no-cache, build-image-missing) to build images for the selected distro only - Simplify test-container script to validate a single distro image using the `distro` environment variable - Simplify E2E, unit, and integration test scripts to run against a single distro container instead of iterating over all distros https://chatgpt.com/share/693acbba-9e30-800f-94fb-fea4489e9078
25 lines
659 B
Bash
Executable File
25 lines
659 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
source "${SCRIPT_DIR}/resolve-base-image.sh"
|
|
|
|
IMAGE="package-manager-test-$distro"
|
|
BASE_IMAGE="$(resolve_base_image "$distro")"
|
|
|
|
if docker image inspect "$IMAGE" >/dev/null 2>&1; then
|
|
echo "[build-missing] Image already exists: $IMAGE (skipping)"
|
|
exit 0
|
|
fi
|
|
|
|
echo
|
|
echo "------------------------------------------------------------"
|
|
echo "[build-missing] Building missing image: $IMAGE"
|
|
echo "BASE_IMAGE = $BASE_IMAGE"
|
|
echo "------------------------------------------------------------"
|
|
|
|
docker build \
|
|
--build-arg BASE_IMAGE="$BASE_IMAGE" \
|
|
-t "$IMAGE" \
|
|
.
|