2025-12-09 05:31:55 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
|
source "${SCRIPT_DIR}/resolve-base-image.sh"
|
|
|
|
|
|
Refactor CI distro handling and container build scripts
- 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
2025-12-11 14:48:36 +01:00
|
|
|
IMAGE="package-manager-test-$distro"
|
|
|
|
|
BASE_IMAGE="$(resolve_base_image "$distro")"
|
2025-12-09 05:31:55 +01:00
|
|
|
|
Refactor CI distro handling and container build scripts
- 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
2025-12-11 14:48:36 +01:00
|
|
|
if docker image inspect "$IMAGE" >/dev/null 2>&1; then
|
|
|
|
|
echo "[build-missing] Image already exists: $IMAGE (skipping)"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-12-09 05:31:55 +01:00
|
|
|
|
|
|
|
|
echo
|
Refactor CI distro handling and container build scripts
- 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
2025-12-11 14:48:36 +01:00
|
|
|
echo "------------------------------------------------------------"
|
|
|
|
|
echo "[build-missing] Building missing image: $IMAGE"
|
|
|
|
|
echo "BASE_IMAGE = $BASE_IMAGE"
|
|
|
|
|
echo "------------------------------------------------------------"
|
|
|
|
|
|
|
|
|
|
docker build \
|
|
|
|
|
--build-arg BASE_IMAGE="$BASE_IMAGE" \
|
|
|
|
|
-t "$IMAGE" \
|
|
|
|
|
.
|