cook: two default dishes (phyllomeos, phyllomeos-headless) + guest/experimental tiers; CI builds raw images
Manifest groups get a tier; only `default` is generated (make all TIER=..., --tier). Default: phyllomeos (GNOME + virt-manager) and phyllomeos-headless, Fedora 44, systemd-boot, CPU-agnostic hypervisor ingredient (hypervisor_type: any). guest tier: guest-server, guest-desktop. experimental: biosboot/grub, encrypted, rawhide. Generator clears stale recipes/dishes before writing. build-image.sh: --dish and --tier; deploy.sh: --tier. build-iso.yaml replaced by build-image.yaml: raw images for both editions on the fedora:host runner (TMPDIR=/var/tmp, max-parallel 1), attached with the flattened kickstarts to tagged releases. Live edition no longer built. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
35d8879bcc
commit
67316d9852
@@ -0,0 +1,110 @@
|
||||
name: build-image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*.*.*"]
|
||||
|
||||
# Builds raw disk images of the two default-tier editions (see
|
||||
# cook/recipes_manifest.yaml) with build-image.sh, i.e.
|
||||
# `livemedia-creator --no-virt --make-disk`. Other tiers (guest, experimental)
|
||||
# are built on demand with `./build-image.sh --tier <tier>`.
|
||||
#
|
||||
# The build job runs on the registered `fedora:host` runner (a Fedora VM, jobs
|
||||
# run as root), not in a container: --make-disk needs real loop devices and a
|
||||
# live systemd-udevd. The runner needs lorax-lmc-novirt, qemu-img, make,
|
||||
# python3-pip, pykickstart and xz installed.
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: fedora
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
container:
|
||||
image: git.phyllo.me/devops/fedora-runner-image:latest
|
||||
|
||||
steps:
|
||||
- uses: https://git.phyllo.me/devops/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Python deps
|
||||
run: pip install -r cook/requirements.txt
|
||||
|
||||
- name: Generate, lint, and validate dishes
|
||||
run: |
|
||||
cd cook
|
||||
make all
|
||||
|
||||
build-image:
|
||||
needs: validate
|
||||
runs-on: fedora
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# One image at a time: each build takes loop devices, RAM and tens of GiB
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
include:
|
||||
- edition: phyllomeos
|
||||
root_size: 16384
|
||||
- edition: phyllomeos-headless
|
||||
root_size: 8192
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
# /tmp is a small tmpfs on the runner; livemedia-creator writes the whole
|
||||
# disk image under $TMPDIR
|
||||
TMPDIR: /var/tmp
|
||||
|
||||
steps:
|
||||
- uses: https://git.phyllo.me/devops/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check runner prerequisites
|
||||
run: |
|
||||
missing=0
|
||||
for tool in livemedia-creator qemu-img make pip xz sudo; do
|
||||
command -v "$tool" >/dev/null || { echo "missing on runner: $tool"; missing=1; }
|
||||
done
|
||||
[ -e /dev/loop-control ] || { echo "missing on runner: /dev/loop-control"; missing=1; }
|
||||
[ "$missing" = 0 ] || exit 1
|
||||
|
||||
- name: Install Python deps
|
||||
run: pip install -r cook/requirements.txt
|
||||
|
||||
- name: Build raw image
|
||||
run: |
|
||||
# Editions are named "<edition>_<values...>.cfg"; the trailing "_" keeps
|
||||
# "phyllomeos" from matching "phyllomeos-headless".
|
||||
(cd cook && make all)
|
||||
dish="$(basename "$(ls cook/dishes/${{ matrix.edition }}_*.cfg)" .cfg)"
|
||||
echo "DISH=$dish" >> "$GITHUB_ENV"
|
||||
./build-image.sh --dish "$dish" --root-size ${{ matrix.root_size }}
|
||||
xz -T0 "build/$dish.img"
|
||||
|
||||
- name: Upload image and kickstart as artifact
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.edition }}
|
||||
path: |
|
||||
build/${{ env.DISH }}.img.xz
|
||||
cook/dishes/${{ env.DISH }}.cfg
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Publish image and kickstart as release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: https://git.phyllo.me/devops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
build/${{ env.DISH }}.img.xz
|
||||
cook/dishes/${{ env.DISH }}.cfg
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Clean up build products
|
||||
if: always()
|
||||
run: rm -rf build /var/tmp/lmc-result.*
|
||||
@@ -1,82 +0,0 @@
|
||||
name: build-iso
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*.*.*"]
|
||||
|
||||
env:
|
||||
FEDORA_VERSION: "44"
|
||||
KICKSTART_FILE: live-desktop_44_livefs_grub_gnome_guest-agents_live
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: fedora
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
container:
|
||||
image: git.phyllo.me/devops/fedora-runner-image:latest
|
||||
|
||||
steps:
|
||||
- uses: https://git.phyllo.me/devops/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Python deps
|
||||
run: pip install -r cook/requirements.txt
|
||||
|
||||
- name: Generate, lint, and validate dishes
|
||||
run: |
|
||||
cd cook
|
||||
make all
|
||||
|
||||
build-iso:
|
||||
needs: validate
|
||||
runs-on: fedora
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
container:
|
||||
image: git.phyllo.me/devops/fedora-runner-image:latest
|
||||
privileged: true
|
||||
|
||||
steps:
|
||||
- uses: https://git.phyllo.me/devops/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Python deps
|
||||
run: pip install -r cook/requirements.txt
|
||||
|
||||
- name: Install build tools
|
||||
run: dnf -y install lorax-lmc-novirt pykickstart livecd-tools
|
||||
|
||||
- name: Generate dishes
|
||||
run: |
|
||||
cd cook
|
||||
make all
|
||||
|
||||
- name: Build ISO with livemedia-creator
|
||||
run: |
|
||||
for i in $(seq 0 63); do mknod -m 0660 /dev/loop$i b 7 $i 2>/dev/null || true; done
|
||||
mknod -m 0660 /dev/loop-control b 7 0 2>/dev/null || true
|
||||
ks="$(mktemp --suffix=.cfg)"
|
||||
grep -v -E '^(text|cmdline|graphical)([[:space:]]|$)' "cook/dishes/${{ env.KICKSTART_FILE }}.cfg" > "$ks"
|
||||
livemedia-creator --ks "$ks" --no-virt --resultdir build --project phyllomeos --make-iso --volid phyllomeos --iso-only --iso-name ${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso --releasever ${{ env.FEDORA_VERSION }} --macboot
|
||||
|
||||
- name: Upload ISO as artifact
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso
|
||||
path: build/${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Publish ISO as release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: https://git.phyllo.me/devops/action-gh-release@v2
|
||||
with:
|
||||
files: build/${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso
|
||||
draft: false
|
||||
prerelease: false
|
||||
Reference in New Issue
Block a user