CI: Add debugging instrumentation to identify container build/run anomalies
Some checks failed
CI / test-unit (push) Has been cancelled
CI / test-integration (push) Has been cancelled
CI / test-container (push) Has been cancelled
CI / test-e2e (push) Has been cancelled
CI / test-virgin-user (push) Has been cancelled
CI / test-virgin-root (push) Has been cancelled
Some checks failed
CI / test-unit (push) Has been cancelled
CI / test-integration (push) Has been cancelled
CI / test-container (push) Has been cancelled
CI / test-e2e (push) Has been cancelled
CI / test-virgin-user (push) Has been cancelled
CI / test-virgin-root (push) Has been cancelled
- Added `git rev-parse HEAD` to test-container workflow to confirm the exact commit SHA used during CI runs. - Updated Dockerfile to print BASE_IMAGE and OS release information during build for better reproducibility diagnostics. - Extended test-container script to dump the first 40 lines of `docker image inspect` output, allowing verification of the image ID, creation time, and applied build args. These additions help trace discrepancies between local builds and GitHub Actions, ensuring we can detect mismatches in commit SHA, base image, or container metadata. https://chatgpt.com/share/693ae07a-8c58-800f-88e6-254cdb00b676
This commit is contained in:
3
.github/workflows/test-container.yml
vendored
3
.github/workflows/test-container.yml
vendored
@@ -16,6 +16,9 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Show commit SHA
|
||||||
|
run: git rev-parse HEAD
|
||||||
|
|
||||||
- name: Show Docker version
|
- name: Show Docker version
|
||||||
run: docker version
|
run: docker version
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Base image selector — overridden by Makefile
|
# Base image selector — overridden by Makefile
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
ARG BASE_IMAGE=archlinux:latest
|
ARG BASE_IMAGE
|
||||||
FROM ${BASE_IMAGE}
|
FROM ${BASE_IMAGE}
|
||||||
|
|
||||||
|
RUN echo "BASE_IMAGE=${BASE_IMAGE}" && \
|
||||||
|
cat /etc/os-release || true
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Nix environment defaults
|
# Nix environment defaults
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ echo
|
|||||||
echo "------------------------------------------------------------"
|
echo "------------------------------------------------------------"
|
||||||
echo ">>> Testing container: $IMAGE"
|
echo ">>> Testing container: $IMAGE"
|
||||||
echo "------------------------------------------------------------"
|
echo "------------------------------------------------------------"
|
||||||
|
echo "[test-container] Inspect image metadata:"
|
||||||
|
docker image inspect "$IMAGE" | sed -n '1,40p'
|
||||||
|
|
||||||
echo "[test-container] Running: docker run --rm --entrypoint pkgmgr $IMAGE --help"
|
echo "[test-container] Running: docker run --rm --entrypoint pkgmgr $IMAGE --help"
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user