10 Commits

Author SHA1 Message Date
benvin 2800eca378 Merge pull request 'ci: switch Go steps to gobuilder, enable S3 build cache' (#3) from benvin/gocache into main
Reviewed-on: #3
2026-10-03 00:25:03 +10:00
unkin-agent b4d1b3594a ci: bump gobuilder to 0.1.3-alma9
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
0.1.2-alma9 left $GOPATH/bin off PATH, so the package step's
`go install goreleaser` succeeded but `goreleaser` exited 127.
0.1.3-alma9 sets GOPATH=/go and PATH=/go/bin:$PATH.
2026-10-03 00:18:13 +10:00
unkin-agent 5c5a069d57 ci: switch Go steps to gobuilder, enable S3 build cache
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
golang:1.25/1.26 and the stale almalinux9-gobuilder pin are replaced by
gobuilder:0.1.2-alma9 on every step that invokes the Go toolchain, with
GOCACHEPROG wired to the baked-in go-cache-plugin against the shared
S3 cache bucket.

- build.yaml/test.yaml/release.yaml: build+test+goreleaser steps use
  gobuilder, cache env added
- pre-commit.yaml: switch pin, add cache (hooks run go-fmt/go-vet/go-unit-tests)
- lint step (test.yaml) and upload-rpm step left untouched
2026-10-02 23:47:35 +10:00
benvin fe44518287 Merge pull request 'Package encapic as an RPM for the VM puppet masters' (#2) from benvin/rpm-packaging into main
ci/woodpecker/tag/release Pipeline was successful
Reviewed-on: #2
v0.2.0
2026-09-19 18:40:41 +10:00
unkin-agent 2241ea3d72 Stop nested class parameters being parsed as classes
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
encapi's cobbler-wire document keys class parameters under the role name, and
the line-based parser treats every indented line as a class, so a node with
class params is classified with the parameter keys as extra classes.

- track the indentation of the classes block and skip deeper lines
- cover the nested form real cobbler-imported nodes return
2026-09-19 18:12:47 +10:00
unkin-agent 1e48c06bfe Package encapic as an RPM published to rpm-internal
The VM puppet masters are dnf-managed hosts moving off cobbler onto encapi,
and encapic ships only as a release binary the k8s compilers curl.

- drive the release with goreleaser, keeping the encapic_linux_amd64 asset
  and its .sha256 byte-compatible with the compiler initContainer
- build encapic-<version>-1.x86_64.rpm and PUT it to artifactapi rpm-internal
- install /usr/bin/encapic, the /usr/bin/encapic-enc ENC entrypoint and
  /etc/encapic/encapic.conf as %config(noreplace)
- add make rpm/rpm-package/pre-commit and a PR packaging check
2026-09-19 18:12:47 +10:00
benvin 75ed5e5cdf Merge pull request 'Add encapic ENC client' (#1) from benvin/initial into main
ci/woodpecker/tag/release Pipeline was successful
Reviewed-on: #1
v0.1.0
2026-07-25 10:18:40 +10:00
benvin 7f8ca8046e Check error returns to satisfy errcheck lint
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
2026-07-25 10:00:07 +10:00
benvin e200c0f7d2 Add encapic ENC client
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline was successful
The uv/python ENC script fails its first-invocation dependency resolution on
fresh compiler pods (exits 135/2), which breaks puppet agent catalog
compilation. encapic is a stdlib-only Go replacement with no runtime
dependency resolution.

- Add encapic CLI: fetch the cobbler-wire ENC document from encapi
  (ENCAPI_URL override, in-cluster default compiled in) and reshape it to
  match the python script byte-for-byte (classes to list, enc_role/enc_env
  parameters, environment dropped when testing), exiting non-zero on any
  HTTP/parse failure so the puppet exec ENC fails safe.
- Hand-parse the small fixed cobbler-wire YAML and hand-emit the output using
  the standard library only.
- Add table-driven normalisation tests, httptest 200/404/500/timeout tests,
  and a golden-output test.
- Add Makefile (build/test/lint/fmt + patch/minor/major with version
  ldflags), .gitignore, .pre-commit-config.yaml, and Woodpecker pipelines
  (build/test/pre-commit on pull_request; release on v* tags).
2026-07-25 09:55:31 +10:00
gitadmin cf45394755 Initial commit 2026-07-25 09:47:52 +10:00