AkurAI Build
Menu

BifrOSt

public

Latest change 396b54c4e84791c369e5492a4639fe02b58b56b6 - Add AkurAI Build CI/CD pipeline for ISO delivery by Ólafur Búi Ólafsson

# AkurAI Build CI/CD for BifrOSt.
#
# Delivers the live/install ISO. An ISO is produced ONLY for minor (or major)
# releases -- versions of the form X.Y.0. Patch releases (X.Y.Z, Z>0) ship
# through the signed [bifrost] pacman repository, not a new ISO, so the build
# and publish jobs no-op on them.
#
# All jobs use the `native` executor: mkarchiso needs root (loop mounts,
# squashfs) and qualification needs /dev/kvm, both of which the Titan worker
# account provides. The ~4 GiB ISO is staged on Titan's filesystem under
# $AKURAI_BUILD_ROOT and never travels through `artifacts:` (512 MiB/run cap).
#
# Flow: verify (static) -> package (build seed + ISO, qualify in QEMU) ->
# publish (approval-gated: serve the ISO at akurai-build downloads and refresh
# the bifrost.olibuijr.com landing page).
version: 1
jobs:
  - name: verify
    executor: native
    branches: [main]
    timeout: 900
    run: python3 validate-build.py .

  - name: package
    executor: native
    needs: [verify]
    branches: [main]
    timeout: 10800
    run: |
      ver="$(cat VERSION)"
      case "$ver" in
        *.*.0) : ;;
        *) echo "BifrOSt $ver is a patch release; ISOs build only on minor releases (X.Y.0). Nothing to build."; exit 0 ;;
      esac
      stage="$AKURAI_BUILD_ROOT/bifrost-release/$ver"
      rm -rf "$stage"
      mkdir -p "$stage"
      sudo python3 prepare-installer-cache.py
      sudo bash build-iso.sh --skip-validate --out-dir "$stage"
      python3 vm/qemu-release-candidate.py \
        --iso "$stage/bifrost-$ver-x86_64.iso" \
        --case standard \
        --work-dir "$stage/qemu-rc" \
        --install-timeout 3600 \
        --boot-timeout 900

  - name: publish
    executor: native
    needs: [package]
    environment: production
    approval: true
    branches: [main]
    timeout: 1800
    run: |
      ver="$(cat VERSION)"
      case "$ver" in
        *.*.0) : ;;
        *) echo "BifrOSt $ver is a patch release; no ISO to publish."; exit 0 ;;
      esac
      bash scripts/publish-iso.sh \
        --version "$ver" \
        --iso "$AKURAI_BUILD_ROOT/bifrost-release/$ver/bifrost-$ver-x86_64.iso"