diff --git a/.github/workflows/post-testing-e2e.yml b/.github/workflows/post-testing-e2e.yml index 206e1a9e5..12a632247 100644 --- a/.github/workflows/post-testing-e2e.yml +++ b/.github/workflows/post-testing-e2e.yml @@ -141,9 +141,73 @@ jobs: path: docs/verification/ # Never upload debug ISOs or test disks: they contain test passwords. - promote-to-testing: + # Test credentials are only present in the DEBUG=1 ISO above. Build this + # artifact after the whole matrix passes, so a retained ISO is production + # media and every configured image has completed its offline-install gate. + production-iso: needs: [resolve, luks] runs-on: ubuntu-26.04 + timeout-minutes: 90 + permissions: + contents: read + packages: read + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.resolve.outputs.matrix) }} + steps: + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 + with: + ref: ${{ needs.resolve.outputs.sha }} + persist-credentials: false + - name: Prepare production ISO host + run: | + set -euo pipefail + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc + sudo apt-get update + sudo apt-get install -y podman skopeo uidmap slirp4netns fuse-overlayfs \ + squashfs-tools xorriso dosfstools mtools + mkdir -p output + df -h . + - name: Pull exact published payload + env: + GH_TOKEN: ${{ github.token }} + IMAGE_REF: ${{ matrix.ref }} + run: | + set -euo pipefail + echo "$GH_TOKEN" | podman login ghcr.io -u "$GITHUB_ACTOR" --password-stdin + podman pull "$IMAGE_REF" + podman logout ghcr.io + - name: Compose production ISO and checksum + env: + IMAGE_REF: ${{ matrix.ref }} + UTAH_ISO_WORKDIR: ${{ runner.temp }} + run: | + set -euo pipefail + bash iso/scripts/build-iso.sh "$IMAGE_REF" "$PWD/output/utah-live.iso" \ + "Utah Live" 0 "$IMAGE_REF" + (cd output && sha256sum utah-live.iso > utah-live.iso.sha256) + # "production" is the DEBUG=0 build, not shippable media. DEBUG=0 keeps + # the test credentials and sshd path out (iso/live/src/configure-live.sh), + # so nothing secret is retained -- but build-iso.sh applies + # `enforcing=0 console=ttyS0,115200n8` for every DEBUG value, so this + # boots SELinux-permissive. Whether the live environment ships that way + # is a product decision tracked in #186 alongside signing and Secure + # Boot; a green job here is not evidence the media is release-ready. + # Multi-GB per flavor per dispatch at 30 days: revisit the window before + # widening the matrix. + - name: Retain production ISO + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + with: + name: production-iso-${{ matrix.image }} + retention-days: 30 + if-no-files-found: error + path: | + output/utah-live.iso + output/utah-live.iso.sha256 + + promote-to-testing: + needs: [resolve, luks, production-iso] + runs-on: ubuntu-26.04 permissions: contents: read packages: write @@ -168,7 +232,7 @@ jobs: done < <(jq -r '.include[].ref' <<< "$MATRIX") documentation: - needs: [resolve, luks] + needs: [resolve, luks, production-iso] runs-on: ubuntu-26.04 permissions: contents: write diff --git a/docs/skills/ci-workflows.md b/docs/skills/ci-workflows.md index 017b713d9..f494c4d10 100644 --- a/docs/skills/ci-workflows.md +++ b/docs/skills/ci-workflows.md @@ -166,19 +166,52 @@ restricted networking. CI requires KVM, PNG screenshots, and OCR evidence that fastfetch ran in the graphical terminal. Test credentials are confined to the disposable ISO/disk; neither is uploaded or released. +Only after the entire LUKS matrix succeeds, `production-iso` composes a fresh +`DEBUG=0` x86_64 UEFI ISO from each same digest, writes its SHA-256 checksum, +and retains both as a 30-day Actions artifact. It is deliberately an artifact, +not a release: destination, flavor policy, naming, signing, and Secure Boot +are product decisions tracked by #186. Production-ISO composition is a +promotion prerequisite, so a failed production build cannot advance testing +tags. Debug ISOs and guest disks are never uploaded because they contain test +credentials. + +**"Production" names the `DEBUG=0` build, not shippable media.** `DEBUG=0` +does exclude the test credentials and sshd path (`iso/live/src/configure-live.sh`), +so the retained artifact carries no secrets — but `iso/scripts/build-iso.sh` +hard-codes `enforcing=0 console=ttyS0,115200n8` on the boot entry for every +`DEBUG` value (the documented Issue #22 exception: rootless `podman unshare` +cannot write `security.selinux` xattrs into the squashfs root), so this ISO +boots SELinux-permissive with a serial console. +That was unremarkable while ISOs were disposable; retaining them for +30 days under the name "production" makes it worth stating plainly. Running +the live environment permissive is a product decision, and it belongs to #186 +along with signing and Secure Boot — it must be settled there before any of +these ISOs reach users. Do not treat a green `production-iso` job as evidence +that the media is release-ready. + +Each retained ISO is multi-GB (the size budget in `iso/scripts/build-iso.sh` +is the ceiling, not the measured size), per flavor, per dispatch, at 30-day +retention. That is real Actions storage; if the matrix widens, revisit the +retention window before the flavor count. + Every matrix job preserves build/test logs, serial logs, and screenshots, including on failure. Only passing jobs upload `docs/verification` with the source commit, original build run, E2E run, image digest and ISO checksum. -The promotion job depends on the entire matrix; a superseded testing commit -cannot move tags. Registry tag copies are sequential, not an atomic multi-tag -transaction: a registry failure can interrupt promotion after a partial copy. +The promotion job depends on the LUKS and production-ISO matrices; a +superseded testing commit cannot move tags. Registry tag copies are sequential, +not an atomic multi-tag transaction: a registry failure can interrupt promotion +after a partial copy. A separate least-privilege job proposes the main desktop's screenshots in -`automation/iso-verification`, a documentation PR. It updates only the README -evidence block and `docs/verification/`, preserving the current README's other -content. The repository must allow Actions to create pull requests; a denied -write fails this job visibly, without deleting test artifacts. It does not -auto-merge the evidence PR or imply a fresh pass for a different commit. +`automation/iso-verification`, a documentation PR. It also depends on +`production-iso`, so a failed production-ISO composition blocks this +screenshot-refresh PR too, not just testing-tag promotion — a LUKS-only +concern in `docs/verification` still has to wait on the whole matrix +composing cleanly. It updates only the README evidence block and +`docs/verification/`, preserving the current README's other content. The +repository must allow Actions to create pull requests; a denied write fails +this job visibly, without deleting test artifacts. It does not auto-merge +the evidence PR or imply a fresh pass for a different commit. For a deliberate rerun, dispatch Post-Testing E2E with `build_run_id` from a successful testing build containing the current harness. Do not pass a PR diff --git a/iso/scripts/build-iso.sh b/iso/scripts/build-iso.sh index 06c19e5af..4068e4151 100644 --- a/iso/scripts/build-iso.sh +++ b/iso/scripts/build-iso.sh @@ -145,6 +145,15 @@ mcopy -i "${ESP}" "${INITRD}" ::/images/pxeboot/initrd.img # Documented exception (Issue #22): rootless podman unshare cannot write security.selinux # xattrs into the squashfs root, leaving it unlabeled. enforcing=0 is required for live boot # to avoid systemd/GDM denials until xattr-preserving rootfs assembly is implemented. +# +# This applies for every DEBUG value, which was unremarkable while every ISO +# was disposable. Since post-testing-e2e.yml began retaining the DEBUG=0 build +# for 30 days as "production-iso-*", it is no longer only a test concern: a +# permissive live boot is a product decision, tracked with signing and Secure +# Boot in #186, and must be settled there before any of these ISOs reach +# users. DEBUG=0 does still exclude the test credentials and sshd path +# (iso/live/src/configure-live.sh), so the retained artifact carries no +# secrets; it is simply not release media. cat > "${WORK}/utah-live.conf" <