feat: add kustomize
Build / build-8 (pull_request) Successful in 15s
Build / build-9 (pull_request) Successful in 15s

- add kustomize to rpmbuilder
This commit is contained in:
2026-03-01 23:41:57 +11:00
parent 4976f0e43b
commit c8bb19d6d6
3 changed files with 72 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/bash
set -e
# Download kustomize binary
wget -O /app/kustomize_v${PACKAGE_VERSION}_linux_amd64.tar.gz https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${PACKAGE_VERSION}/kustomize_v${PACKAGE_VERSION}_linux_amd64.tar.gz
# Extract the binary
tar -xzf /app/kustomize_v${PACKAGE_VERSION}_linux_amd64.tar.gz -C /app/
# Process nfpm.yaml with envsubst
envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml
# Build the RPM
nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
+39
View File
@@ -0,0 +1,39 @@
---
# nfpm.yaml
name: ${PACKAGE_NAME}
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: ${PACKAGE_ARCH}
platform: ${PACKAGE_PLATFORM}
section: default
priority: extra
description: "${PACKAGE_DESCRIPTION}"
maintainer: ${PACKAGE_MAINTAINER}
homepage: ${PACKAGE_HOMEPAGE}
license: ${PACKAGE_LICENSE}
disable_globbing: false
replaces:
- kustomize
provides:
- kustomize
# Files to include in the package
contents:
- src: /app/kustomize
dst: /usr/bin/kustomize
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