Merge pull request 'feat: add OpenBao plugin RPMs for consul and nomad secrets engines' (#66) from benvin/openbao-plugins into master
Some checks failed
Deploy / deploy-9 (push) Failing after 3s
Deploy / deploy-8 (push) Successful in 6s

Reviewed-on: #66
This commit is contained in:
Ben Vincent 2025-10-17 15:09:24 +11:00
commit fdf9a11a4c
17 changed files with 225 additions and 0 deletions

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,18 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: openbao-plugin-secret-consul
release: 1
version: 0.1.0
github: openbao/openbao-plugins
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,16 @@
#!/usr/bin/bash
# Download the required files
curl -L -o /app/openbao-plugin-secrets-consul.tar.gz https://github.com/openbao/openbao-plugins/releases/download/secrets-consul-v${PACKAGE_VERSION}/openbao-plugin-secrets-consul_linux_amd64_v1.tar.gz
# Extract the binary
tar -xzf /app/openbao-plugin-secrets-consul.tar.gz -C /app
# Rename the binary to a simpler name
mv /app/openbao-plugin-secrets-consul_linux_amd64_v1 /app/openbao-plugin-secrets-consul
# Make the binary executable
chmod +x /app/openbao-plugin-secrets-consul
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,35 @@
# nfpm.yaml
name: openbao-plugin-secret-consul
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "OpenBao secrets engine plugin for HashiCorp Consul"
maintainer: OpenBao Community
homepage: https://github.com/openbao/openbao-plugins
license: MPL-2.0
disable_globbing: false
replaces:
- openbao-plugin-secret-consul
provides:
- openbao-plugin-secret-consul
# Files to include in the package
contents:
- src: /app/openbao-plugin-secrets-consul
dst: /opt/openbao-plugins/openbao-plugin-secrets-consul
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal
scripts:
preinstall: /app/resources/scripts/preinstall.sh

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
mkdir -p /opt/openbao-plugins

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,18 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: openbao-plugin-secret-nomad
release: 1
version: 0.1.4
github: openbao/openbao-plugins
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,16 @@
#!/usr/bin/bash
# Download the required files
curl -L -o /app/openbao-plugin-secrets-nomad.tar.gz https://github.com/openbao/openbao-plugins/releases/download/secrets-nomad-v${PACKAGE_VERSION}/openbao-plugin-secrets-nomad_linux_amd64_v1.tar.gz
# Extract the binary
tar -xzf /app/openbao-plugin-secrets-nomad.tar.gz -C /app
# Rename the binary to a simpler name
mv /app/openbao-plugin-secrets-nomad_linux_amd64_v1 /app/openbao-plugin-secrets-nomad
# Make the binary executable
chmod +x /app/openbao-plugin-secrets-nomad
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,35 @@
# nfpm.yaml
name: openbao-plugin-secret-nomad
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "OpenBao secrets engine plugin for HashiCorp Nomad"
maintainer: OpenBao Community
homepage: https://github.com/openbao/openbao-plugins
license: MPL-2.0
disable_globbing: false
replaces:
- openbao-plugin-secret-nomad
provides:
- openbao-plugin-secret-nomad
# Files to include in the package
contents:
- src: /app/openbao-plugin-secrets-nomad
dst: /opt/openbao-plugins/openbao-plugin-secrets-nomad
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal
scripts:
preinstall: /app/resources/scripts/preinstall.sh

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
mkdir -p /opt/openbao-plugins

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,18 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: openbao-plugins
release: 1
version: 1.0.0
github: openbao/openbao-plugins
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,5 @@
#!/usr/bin/bash
# This is a meta package - no binaries to download
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,30 @@
# nfpm.yaml
name: openbao-plugins
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "Meta package that installs all OpenBao plugins"
maintainer: OpenBao Community
homepage: https://github.com/openbao/openbao-plugins
license: MPL-2.0
disable_globbing: false
replaces:
- openbao-plugins
provides:
- openbao-plugins
# Dependencies - this meta package pulls in all plugin packages
depends:
- openbao-plugin-secret-consul
- openbao-plugin-secret-nomad
# No actual files in this meta package
contents: []