Merge pull request 'feat: add helmfile package configuration' (#63) from feat/add-helmfile-package into master
All checks were successful
Deploy / deploy-9 (push) Successful in 5s
Deploy / deploy-8 (push) Successful in 8s

Reviewed-on: #63
This commit is contained in:
Ben Vincent 2025-10-04 12:54:05 +10:00
commit 873abe18c8
5 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1 @@
1

18
rpms/helmfile/Dockerfile Normal file
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: helmfile
release: 1
version: 1.1.7
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: helmfile/helmfile

View File

@ -0,0 +1,14 @@
#!/usr/bin/bash
# Download the required files
curl -L -o /app/helmfile.tar.gz https://github.com/helmfile/helmfile/releases/download/v${PACKAGE_VERSION}/helmfile_${PACKAGE_VERSION}_linux_amd64.tar.gz
# Extract the binary
cd /app
tar -xzf helmfile.tar.gz
# Make the binary executable
chmod +x /app/helmfile
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,38 @@
# nfpm.yaml
name: helmfile
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "A declarative spec for deploying Helm charts. It lets you keep a directory of chart value files and maintain changes in version control; apply CI/CD to configuration changes; and periodically sync to avoid skew in environments."
maintainer: Helmfile Contributors
homepage: https://github.com/helmfile/helmfile
license: MIT
disable_globbing: false
replaces:
- helmfile
provides:
- helmfile
# Files to include in the package
contents:
- src: /app/helmfile
dst: /usr/bin/helmfile
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
# scripts:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh