Add on-tag RPM build (nfpm) and upload to artifactapi
Publish the plugin as an installable RPM so hosts can drop it into the Vault/ OpenBao plugin directory. On a tag, build the binary, package it with nfpm (mirroring the rpmbuilder approach), and upload the RPM to artifactapi's local rpm-internal repository. - Add packaging/nfpm.yaml installing the binary to /opt/vault-plugins/ plus a preinstall script that creates the directory - Add scripts/build-rpm.sh and make rpm / rpm-package targets - Add .woodpecker/release.yml (event: tag): build -> nfpm package -> PUT to artifactapi remotes/rpm-internal/files/
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
when:
|
||||
- event: tag
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: git.unkin.net/unkin/almalinux9-gobuilder:20260606
|
||||
commands:
|
||||
- make build VERSION=${CI_COMMIT_TAG}
|
||||
|
||||
- name: package
|
||||
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
commands:
|
||||
- ./scripts/build-rpm.sh ${CI_COMMIT_TAG}
|
||||
depends_on: [build]
|
||||
|
||||
- name: upload
|
||||
image: git.unkin.net/unkin/almalinux9-base:20260606
|
||||
commands:
|
||||
- |
|
||||
for rpm in dist/*.rpm; do
|
||||
FILE=$$(basename "$$rpm")
|
||||
echo "Uploading $${FILE} to artifactapi rpm-internal"
|
||||
curl -f -X PUT \
|
||||
"https://artifactapi3.k8s.syd1.au.unkin.net/api/v2/remotes/rpm-internal/files/$${FILE}" \
|
||||
-H "Content-Type: application/x-rpm" \
|
||||
--data-binary @"$$rpm"
|
||||
done
|
||||
depends_on: [package]
|
||||
Reference in New Issue
Block a user