Skip to content

ci(freebsd): real pkg build via FreeBSD VM + Dockerfile lint#393

Closed
remyluslosius wants to merge 1 commit into
mainfrom
chore/freebsd-ci-validation
Closed

ci(freebsd): real pkg build via FreeBSD VM + Dockerfile lint#393
remyluslosius wants to merge 1 commit into
mainfrom
chore/freebsd-ci-validation

Conversation

@remyluslosius

Copy link
Copy Markdown
Contributor

Closes the two remaining Q2 Workstream H items (H1 and H3).

Summary

Adds .github/workflows/freebsd-validate.yml with three jobs:

  1. dockerfile-lint — hadolint on the three Dockerfile.*.freebsd files
  2. compose-validatedocker compose config on docker-compose.freebsd.yml
  3. freebsd-pkg-build — runs packaging/freebsd/build-pkg.sh inside a real FreeBSD 15.0 VM (via vmactions/freebsd-vm@v1), verifies the .pkg artifact is produced, uploads it to the run

Honest scope

Genuinely validated:

  • FreeBSD Dockerfile syntax and hadolint best practices
  • docker-compose.freebsd.yml structure (parses cleanly under docker compose config)
  • Native FreeBSD pkg builds end-to-end on real FreeBSD 15.0 (Python venv, backend app, frontend SPA, Kensa rules, rc.d scripts, MANIFEST, pkg create produces .pkg file, pkg info -F reads it)

Still NOT validated (and the headers now say so):

  • Runtime build of the FreeBSD Dockerfiles. Building a FROM freebsd/freebsd:15.0-RELEASE image requires OCI v1.3 FreeBSD-aware runtime, which Linux docker buildx can't provide. Would need either a FreeBSD host runner or FreeBSD container support in GHA Linux runners. Out of scope until one of those exists.

Changes

File Change
.github/workflows/freebsd-validate.yml New: 3 validation jobs + summary gate
docker/Dockerfile.backend.freebsd Replace "UNTESTED" banner with precise validation status
docker/Dockerfile.db.freebsd Same
docker/Dockerfile.frontend.freebsd Same
packaging/freebsd/build-pkg.sh Uncomment pkg create call (was left as TODO); add artifact verification; remove stale UNTESTED banner

Trigger matrix

Trigger Rationale
push/PR touching FreeBSD files Fast feedback on direct changes
Weekly (Sun 04:00 UTC) Catch upstream breakage (FreeBSD 15 pkg repos, vmactions image drift, Kensa dep changes)
Manual dispatch On-demand validation

Not added to branch-protection required checks — FreeBSD is an alternative deployment target, not the default. Breaking FreeBSD should not block general development velocity but should be fixed soon after detection (hence the weekly schedule).

Runtime cost

  • dockerfile-lint + compose-validate: <1 min on Linux runner
  • freebsd-pkg-build: ~8-12 min (VM boot ~4 min, pkg install ~2 min, build ~2-6 min)

Triggering only on FreeBSD-path changes keeps the cost scoped to the ~5% of PRs that actually touch this surface.

Test plan

  • CI runs cleanly on this PR (the workflow triggers itself on its own file change)
  • pkg info -F output confirms the package manifest is valid
  • pkg artifact uploaded to run
  • Weekly schedule fires at next Sunday 04:00 UTC (verify in Actions tab)

Q2 Workstream H deliverables:
- H1 (Dockerfile validation): hadolint on the three .freebsd Dockerfiles.
  Full runtime build of FreeBSD Docker containers requires OCI v1.3 runtime
  support, which standard Linux GHA runners don't provide. Lint catches
  syntax and best-practice issues; runtime build remains explicitly
  un-validated and the Dockerfile headers now say so clearly.
- H1 (compose validation): `docker compose config` on docker-compose.freebsd.yml
  to parse and validate service wiring.
- H3 (pkg build): runs packaging/freebsd/build-pkg.sh inside a real
  FreeBSD 15.0 VM via vmactions/freebsd-vm@v1. Produces a .pkg artifact
  and uploads it to the workflow run. Verifies `pkg info -F` can read
  the manifest.

Fixes to make CI possible:
- Uncomment the `pkg create` call at the end of build-pkg.sh (was left
  as a TODO); add artifact verification and error-exit if no .pkg produced.
- Remove stale UNTESTED banner from script and Dockerfile headers;
  replace with precise Validation status describing what is / is not
  CI-validated.

Workflow triggers: push/PR on FreeBSD paths, weekly (Sunday 04:00 UTC)
to catch upstream breakage, and manual dispatch. Not added to branch
protection required checks; FreeBSD validation is informational.
remyluslosius added a commit that referenced this pull request Apr 14, 2026
Drops all FreeBSD-related artifacts. Containers stay on the current Linux
mix (UBI 9 backend/worker, Alpine db/frontend) and air-gapped deployment
remains served by the native RPM/DEB packages.

Why dropped:
- Standard Linux Docker hosts cannot execute FreeBSD OCI containers; that
  requires OCI v1.3 with a FreeBSD-aware runtime, which only exists on
  FreeBSD hosts. Every developer machine and every GitHub Actions Linux
  runner falls in this category.
- GitHub Actions does not provide FreeBSD runners. Self-hosted FreeBSD
  runners would need to be procured and maintained.
- The pkg deliverable (H3) alone did not justify maintaining the
  container fork.

Removed:
- docker/Dockerfile.backend.freebsd
- docker/Dockerfile.db.freebsd
- docker/Dockerfile.frontend.freebsd
- docker-compose.freebsd.yml
- packaging/freebsd/ (build-pkg.sh + rc.d scripts)

BACKLOG.md cleaned of the FreeBSD packaging row.

Supersedes PR #393 (FreeBSD CI validation).
@remyluslosius

Copy link
Copy Markdown
Contributor Author

Superseded by PR for FreeBSD removal — no path forward (Linux Docker cannot run FreeBSD OCI containers; no FreeBSD CI runners). All FreeBSD artifacts removed instead.

@remyluslosius remyluslosius deleted the chore/freebsd-ci-validation branch April 14, 2026 09:33
remyluslosius added a commit that referenced this pull request Apr 14, 2026
Drops all FreeBSD-related artifacts. Containers stay on the current Linux
mix (UBI 9 backend/worker, Alpine db/frontend) and air-gapped deployment
remains served by the native RPM/DEB packages.

Why dropped:
- Standard Linux Docker hosts cannot execute FreeBSD OCI containers; that
  requires OCI v1.3 with a FreeBSD-aware runtime, which only exists on
  FreeBSD hosts. Every developer machine and every GitHub Actions Linux
  runner falls in this category.
- GitHub Actions does not provide FreeBSD runners. Self-hosted FreeBSD
  runners would need to be procured and maintained.
- The pkg deliverable (H3) alone did not justify maintaining the
  container fork.

Removed:
- docker/Dockerfile.backend.freebsd
- docker/Dockerfile.db.freebsd
- docker/Dockerfile.frontend.freebsd
- docker-compose.freebsd.yml
- packaging/freebsd/ (build-pkg.sh + rc.d scripts)

BACKLOG.md cleaned of the FreeBSD packaging row.

Supersedes PR #393 (FreeBSD CI validation).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant