Files
bootapi-images/.woodpecker/release.yaml
unkinben ac1a5d85f6 Seed bootapi-images: AlmaLinux node rootfs build
Builds the AlmaLinux 9 node rootfs tarball bootapi's image-based provisioning
(liveimg) unpacks, and on a v* tag publishes almalinux9-node-<ver>.tar.zst to the
artifactapi rootfs-images repo. Moved out of bootapi-templates (which stays
templates-only) per review on bootapi-templates#3.

- packages.txt (bake list) + scripts/build-rootfs.sh (dnf --installroot -> tar.zst).
- .woodpecker: pre-commit + shellcheck (PR); build+upload on v* tag.
- Makefile (build/lint/patch|minor|major).

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-30 21:04:06 +10:00

58 lines
1.8 KiB
YAML

when:
- event: tag
ref: refs/tags/v*
# On a v* tag: build the AlmaLinux 9 node rootfs and publish
# almalinux9-node-<tag-without-v>.tar.zst to the artifactapi rootfs-images local
# repo, where the bootapi-templates almalinux9-image catalog entry's liveimg
# points. Bump the image with `make patch|minor|major`.
steps:
- name: build-rootfs
image: git.unkin.net/unkin/almalinux9-base:20260606
commands:
- dnf -y install tar zstd
- ./scripts/build-rootfs.sh ${CI_COMMIT_TAG}
backend_options:
kubernetes:
serviceAccountName: default
resources:
requests:
memory: 2Gi
cpu: 2
ephemeral-storage: 8Gi
limits:
memory: 4Gi
cpu: 4
ephemeral-storage: 16Gi
- name: upload
image: git.unkin.net/unkin/almalinux9-base:20260606
commands:
- |
VER="${CI_COMMIT_TAG#v}"
HOST="https://artifactapi.k8s.syd1.au.unkin.net"
REPO="rootfs-images"
FILE="almalinux9-node-$${VER}.tar.zst"
# Immutable, versioned artifact; skip if this version already exists.
code=$$(curl -s -o /dev/null -w '%{http_code}' "$$HOST/api/v2/remotes/$$REPO/files/$$FILE" || true)
if [ "$$code" = "200" ]; then
echo "$$FILE already exists (HTTP $$code); skipping upload"
exit 0
fi
curl -f -X PUT "$$HOST/api/v2/remotes/$$REPO/files/$$FILE" \
-H "Content-Type: application/zstd" \
--data-binary @"dist/$$FILE"
depends_on: [build-rootfs]
backend_options:
kubernetes:
serviceAccountName: default
resources:
requests:
memory: 512Mi
cpu: 500m
ephemeral-storage: 8Gi
limits:
memory: 1Gi
cpu: 1
ephemeral-storage: 16Gi