abcfe87090
ci/woodpecker/push/deploy-fedora42 Pipeline was canceled
ci/woodpecker/push/deploy-fedora43 Pipeline was canceled
ci/woodpecker/push/deploy-almalinux9 Pipeline was canceled
ci/woodpecker/push/deploy-almalinux8 Pipeline was canceled
ci/woodpecker/push/deploy-fedora44 Pipeline was canceled
cmctl, the cert-manager CLI, has no internal RPM, so hosts install it by hand and get no shell or `kubectl cert-manager` completion. - add cmctl 2.6.1 package for el9 and fedora 42-44, verified against upstream checksums.txt - generate bash/zsh/fish completions at build time - ship `kubectl-cert_manager` symlink and `kubectl_complete-cert_manager` for kubectl plugin completion Requires terraform-artifactapi github allowlist entries for cert-manager/cmctl. Reviewed-on: #182 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
23 lines
780 B
Bash
Executable File
23 lines
780 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
set -e
|
|
|
|
BASE_URL="https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/cert-manager/cmctl/releases/download/v${PACKAGE_VERSION}"
|
|
|
|
wget -O /app/cmctl "${BASE_URL}/cmctl_linux_amd64"
|
|
wget -O /app/checksums.txt "${BASE_URL}/checksums.txt"
|
|
|
|
# Upstream lists the asset name; check it against the local filename.
|
|
cd /app
|
|
grep ' cmctl_linux_amd64$' checksums.txt | sed 's/cmctl_linux_amd64$/cmctl/' | sha256sum --check --strict -
|
|
chmod +x /app/cmctl
|
|
|
|
mkdir -p /app/completions
|
|
/app/cmctl completion bash > /app/completions/cmctl
|
|
/app/cmctl completion zsh > /app/completions/_cmctl
|
|
/app/cmctl completion fish > /app/completions/cmctl.fish
|
|
|
|
envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml
|
|
|
|
nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|