diff --git a/.gitignore b/.gitignore index 2ad83ab..0c15e09 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,10 @@ /node-lookup /pburl /pblastreport +/pdbmux # cross-compiled release artifacts (e.g. node-lookup-linux-amd64) /node-lookup-* /pburl-* /pblastreport-* +/pdbmux-* dist/ diff --git a/.woodpecker/docker.yaml b/.woodpecker/docker.yaml new file mode 100644 index 0000000..e40c74d --- /dev/null +++ b/.woodpecker/docker.yaml @@ -0,0 +1,34 @@ +# Build and push the pdbmux container image on a v* tag. pdbmux is a k8s-only +# daemon (deployed via argocd-apps), so it ships as an image rather than in the +# RPM. Mirrors the estate convention (encapi's docker.yaml): the +# woodpeckerci/plugin-docker-buildx plugin pushes to the Gitea registry using +# the droneci / DRONECI_PASSWORD credentials. +when: + - event: tag + ref: refs/tags/v* + +steps: + - name: docker-pdbmux + image: woodpeckerci/plugin-docker-buildx + settings: + registry: git.unkin.net + repo: git.unkin.net/unkin/pdbmux + dockerfile: Dockerfile.pdbmux + build_args: + VERSION: ${CI_COMMIT_TAG} + username: droneci + password: + from_secret: DRONECI_PASSWORD + tags: + - ${CI_COMMIT_TAG} + - latest + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 1Gi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 47b7826..3043916 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -28,7 +28,7 @@ steps: # for the shell instead of substituting them (as pipeline vars) at parse # time. ${CI_COMMIT_TAG} is a real Woodpecker var and stays single-$. - | - for entry in "node-lookup:." "pburl:./cmd/pburl" "pblastreport:./cmd/pblastreport"; do + for entry in "node-lookup:." "pburl:./cmd/pburl" "pblastreport:./cmd/pblastreport" "pdbmux:./cmd/pdbmux"; do name="$${entry%%:*}"; pkg="$${entry##*:}" for osarch in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64; do os="$${osarch%/*}"; arch="$${osarch#*/}" @@ -133,6 +133,10 @@ steps: pblastreport-linux-arm64 \ pblastreport-darwin-amd64 \ pblastreport-darwin-arm64 \ + pdbmux-linux-amd64 \ + pdbmux-linux-arm64 \ + pdbmux-darwin-amd64 \ + pdbmux-darwin-arm64 \ --login gitea --repo "${CI_REPO}" depends_on: [upload-rpm] backend_options: diff --git a/AGENTS.md b/AGENTS.md index 57321bf..d7673b9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Project Overview -This repo ships three related Puppet CLIs in one RPM: +This repo ships four related Puppet tools in one RPM: - **`node-lookup`** — queries the PuppetDB API to retrieve and filter node facts. - **`pburl`** — prints the Puppetboard node-page URL for each host (reads hosts @@ -10,10 +10,16 @@ This repo ships three related Puppet CLIs in one RPM: - **`pblastreport`** — prints each host's last Puppet report time and its Puppetboard URL. Output: `\t