Repository navigation
shell-gate: reusable gate for shell and just repositories - #31
Merged
Merged
Conversation
The first shell repository adopting the harness is IronFlock/flockos (image builder). The gate follows the other gates: jobs lint, unit, build run the caller's just recipes. just, shellcheck and shfmt come from tools.lock (shfmt 3.14.1 added), yamllint and bats with bats-support and bats-assert from the Ubuntu archive. Inputs for build-only apt packages, the build recipe's arguments, the build runner (native arm64) and an artifact of the build output for later jobs of the caller. Self-test: shell-pass passes the gate and its artifact reaches a later job; shell-fail must fail lint (unquoted expansion) and test (failing bats test). README gate table and recipe contract, and a caller template ci-shell.yml.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
A reusable gate for shell and
justrepositories, as the README promised for the first one adopting the harness: IronFlock/flockos, the image builder. Tracks #30 (FlockOS IronFlock/ironflockos#109)..github/workflows/shell-gate.yml: jobslint,unit,buildrun the caller's recipes.just,shellcheck,shfmtfromtools.lock;yamllint(lint) andbatswithbats-supportandbats-assert(unit) from the Ubuntu archive.build-apt-packages(mmdebstrap, genimage and the like, build job only),build-args(e.g.amd64-efi base),build-runs-on(native arm64),build-timeout-minutes, andbuild-artifact-path/-name/-retention-daysso an image test or release job of the caller gets the build output.tools.lock:shfmt3.14.1 (digest from the release asset).shell-gate-passruns the gate ontests/fixtures/shell-pass,shell-gate-artifactdownloads its build output in a later job,shell-gate-failasserts thatjust lintfails on an unquoted expansion andjust teston a failing bats test. All three are inselftest-ok.templates/workflows/ci-shell.yml.How it was tested
Locally: actionlint 1.7.12, zizmor 1.31.1 with the harness config and
--min-severity medium, yamllint on the new files; shellcheck flags the fail fixture and passes the pass fixture; both fixture Justfiles passjust --fmt --check. The self-test on this pull request is the real test.After the merge:
just release-patchpublishes v1.5.0 or v1.4.3 (a new workflow is a minor change:just release-minor) and movesv1; then flockos switches itsgatejob to the shared one.