The `virgin` stage installed the distribution build dependencies, and that layer now lives in its own repository: https://github.com/kevinveenbirkenbach/base-images. What remains here is one image per distribution that installs pkgmgr on top of it. `slim` goes with it: it was published for every distribution and pulled by nothing. scripts/build/base.sh stops pinning five upstream images and resolves ghcr.io/<owner>/base-<distro>:<tag> instead. Its env names follow the images repository rather than this one, so the code shows whose namespace that is. image.sh loses the --target axis, the -virgin/-slim tag suffixes with it, and passes --platform on push. Manjaro joins the set; os_resolver.sh already maps it onto arch, so it needs no dependency script of its own. The two virgin workflows pull the base image rather than building it. What they prove is unchanged: pkgmgr installs into an untouched container, as root and as an unprivileged user. test_distro_dependency_scripts_install_gpg_tools goes: it grepped the dependency scripts for gnupg, and those scripts are base-images' responsibility now, where the contract test runs `gpg --version` instead of reading a package list. Verified against locally built base images: the arch image builds FROM base-arch, and the full suite passes inside it - 405 unit, 90 integration and 49 e2e tests. Requires base-images to be published first; until then every build here fails at the pull. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Test Virgin Root
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-virgin-root:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
distro: [arch, debian, ubuntu, fedora, centos]
|
|
env:
|
|
NIX_CONFIG: |
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Show Docker version
|
|
run: docker version
|
|
|
|
- name: Pull base image (${{ matrix.distro }})
|
|
run: docker pull "ghcr.io/kevinveenbirkenbach/base-${{ matrix.distro }}:latest"
|
|
|
|
- name: Virgin ${{ matrix.distro }} pkgmgr test (root)
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
docker run --rm \
|
|
-v "$PWD":/opt/src/pkgmgr \
|
|
-v pkgmgr_repos:/root/Repositories \
|
|
-v pkgmgr_pip_cache:/root/.cache/pip \
|
|
-e NIX_CONFIG="${NIX_CONFIG}" \
|
|
-w /opt/src/pkgmgr \
|
|
"ghcr.io/kevinveenbirkenbach/base-${{ matrix.distro }}:latest" \
|
|
bash -lc '
|
|
set -euo pipefail
|
|
|
|
git config --global --add safe.directory /opt/src/pkgmgr
|
|
|
|
make install
|
|
make setup
|
|
|
|
. "$HOME/.venvs/pkgmgr/bin/activate"
|
|
|
|
pkgmgr update pkgmgr --clone-mode shallow --no-verification
|
|
pkgmgr version pkgmgr
|
|
|
|
echo ">>> Running Nix-based: nix run .#pkgmgr -- version pkgmgr"
|
|
nix run /opt/src/pkgmgr#pkgmgr -- version pkgmgr
|
|
'
|