CI/CD Flow¶
This repository has a CI-friendly validation model and now includes a post-merge GitHub Actions workflow for the public onprem-basic path on a GitHub-hosted Ubuntu 24.04 runner.
What exists today¶
- deterministic root
maketargets for docs and matrix validation - structured
static,contract, andlivelevels - anonymous JSON artifacts under
test-artifacts/for run evidence, including per-scenario manifests and matrix summaries - a clear split between operator entry points and implementation scripts
- a dedicated
test-live-gha-onpremtarget that treats the GitHub runner as the remoteonprem-basichost - a tag-driven release workflow for
productive-k3s-profiles-cli.sh
Release tags¶
Published releases must use composite tags:
X.Y.Z-A.B.CX.Y.Z: version ofproductive-k3s-profilesA.B.C: bound release ofproductive-k3s-core
The release workflow validates that format and publishes an infra bundle whose public CLI is already tied to that productive-k3s-core version.
The repo-level default for official release-oriented flows now lives in scripts/release-config.sh:
PRODUCTIVE_K3S_SOURCE_DEFAULT=remotePRODUCTIVE_K3S_CORE_VERSION_DEFAULT=<current bundled core version>PRODUCTIVE_K3S_RELEASE_REPO_DEFAULT=<core release repo>
That config is the single source of truth for the default remote productive-k3s-core version used when composing official infra release tags.
For developer maintenance, this repo also ships a private helper that rewrites the versioned examples and test expectations in one pass:
make set-core-version CORE_VERSION=A.B.C./scripts/set-core-version.sh A.B.C
Creating a release tag¶
The supported release tagging flow is:
- run
make set-core-version CORE_VERSION=A.B.Cwhen the bundled core version changes - run
make tag-release VERSION=X.Y.Z - push the resulting composite tag with
git push origin X.Y.Z-A.B.C
The helper validates all of the following before creating the local tag:
- the infra version input matches
X.Y.Z - the repo default source is
remote - the default bundled core version is valid
- the default bundled core tag exists in the configured upstream
productive-k3s-coreremote - the resulting composite infra tag does not already exist locally
Local development can still override PRODUCTIVE_K3S_SOURCE, PRODUCTIVE_K3S_VERSION, and PRODUCTIVE_K3S_RELEASE_REPO manually. The repo defaults only define the official release-oriented path.
Practical CI/CD model¶
In CI, the intended flow is:
- run
make test-static - run
make test-contract - run
make test-live-gha-onpremafter merges tomain - run the broader live layer only where the environment supports it
- keep the resulting artifacts as evidence
Why document it now¶
The checked-in workflow still benefits from documenting the CI/CD contract because:
- it stabilizes the repository interface
- it defines what future automation should call
- it keeps local and CI execution aligned
Current public workflow¶
The repository includes .github/workflows/post-merge-onprem-github-host.yml.
That workflow runs when a pull request targeting main is closed in the merged state. It:
- runs
make test-static - runs
make test-contract - checks out sibling
productive-k3s-core - runs
make test-live-gha-onprem
The live job prepares openssh-server on the GitHub-hosted runner and then exercises scenarios/edge/onprem-basic against 127.0.0.1 as a single-node remote host.
When the checked out sibling productive-k3s-core revision already includes scripts/preflight-host.sh, that same hosted path also exercises the remote Productive K3S Core host preflight before bootstrap starts.
Notes¶
Note
The public workflow intentionally validates the onprem-basic single-host path only. It does not replace the broader local live matrix that still depends on environments such as Multipass or external cloud credentials.