Compare commits
3 Commits
2fca534edf
...
745ce03757
| Author | SHA1 | Date | |
|---|---|---|---|
| 745ce03757 | |||
| 3742eabfde | |||
| 5c9fce3607 |
@ -19,10 +19,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /workspace/unkin/rpmbuilder/dist/8
|
mkdir -p /workspace/unkin/rpmbuilder/dist/almalinux/el8
|
||||||
export PREVIOUS_RUN_ID=$((GITHUB_RUN_NUMBER - 1))
|
export PREVIOUS_RUN_ID=$((GITHUB_RUN_NUMBER - 1))
|
||||||
curl -L -o /workspace/rpms.zip "https://git.unkin.net/${GITHUB_REPOSITORY}/actions/runs/${PREVIOUS_RUN_ID}/artifacts/rpms-8"
|
curl -L -o /workspace/rpms.zip "https://git.unkin.net/${GITHUB_REPOSITORY}/actions/runs/${PREVIOUS_RUN_ID}/artifacts/rpms-8"
|
||||||
unzip /workspace/rpms.zip -d /workspace/unkin/rpmbuilder/dist/8
|
unzip /workspace/rpms.zip -d /workspace/unkin/rpmbuilder/dist/almalinux/el8
|
||||||
|
|
||||||
- name: Show RPMs
|
- name: Show RPMs
|
||||||
run: |
|
run: |
|
||||||
@ -32,7 +32,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
for rpm in $(find /workspace/unkin/rpmbuilder/dist/8 -type f -name "*.rpm"); do
|
for rpm in $(find /workspace/unkin/rpmbuilder/dist/almalinux/el8 -type f -name "*.rpm"); do
|
||||||
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el8/upload
|
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el8/upload
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -48,10 +48,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /workspace/unkin/rpmbuilder/dist/9
|
mkdir -p /workspace/unkin/rpmbuilder/dist/almalinux/el9
|
||||||
export PREVIOUS_RUN_ID=$((GITHUB_RUN_NUMBER - 1))
|
export PREVIOUS_RUN_ID=$((GITHUB_RUN_NUMBER - 1))
|
||||||
curl -L -o /workspace/rpms.zip "https://git.unkin.net/${GITHUB_REPOSITORY}/actions/runs/${PREVIOUS_RUN_ID}/artifacts/rpms-9"
|
curl -L -o /workspace/rpms.zip "https://git.unkin.net/${GITHUB_REPOSITORY}/actions/runs/${PREVIOUS_RUN_ID}/artifacts/rpms-9"
|
||||||
unzip /workspace/rpms.zip -d /workspace/unkin/rpmbuilder/dist/9
|
unzip /workspace/rpms.zip -d /workspace/unkin/rpmbuilder/dist/almalinux/el9
|
||||||
|
|
||||||
- name: Show RPMs
|
- name: Show RPMs
|
||||||
run: |
|
run: |
|
||||||
@ -61,6 +61,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
DRONECI_PASSWORD: ${{ secrets.DRONECI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
for rpm in $(find /workspace/unkin/rpmbuilder/dist/9 -type f -name "*.rpm"); do
|
for rpm in $(find /workspace/unkin/rpmbuilder/dist/almalinux/el9 -type f -name "*.rpm"); do
|
||||||
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el9/upload
|
curl --user droneci:${{ secrets.DRONECI_PASSWORD }} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el9/upload
|
||||||
done
|
done
|
||||||
|
|||||||
19
rpms/kubeconform/metadata.yaml
Normal file
19
rpms/kubeconform/metadata.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: kubeconform
|
||||||
|
github: yannh/kubeconform
|
||||||
|
description: A FAST Kubernetes manifests validator, with support for Custom Resources!
|
||||||
|
arch: amd64
|
||||||
|
platform: linux
|
||||||
|
maintainer: Yann Hamon
|
||||||
|
homepage: https://github.com/yannh/kubeconform
|
||||||
|
license: Apache-2.0
|
||||||
|
builds:
|
||||||
|
- repository:
|
||||||
|
- almalinux/el8
|
||||||
|
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
||||||
|
release: 1
|
||||||
|
version: 0.7.0
|
||||||
|
- repository:
|
||||||
|
- almalinux/el9
|
||||||
|
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
|
release: 1
|
||||||
|
version: 0.7.0
|
||||||
14
rpms/kubeconform/resources/build.sh
Executable file
14
rpms/kubeconform/resources/build.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Download kubeconform binary
|
||||||
|
wget -O /app/kubeconform-linux-amd64.tar.gz https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/yannh/kubeconform/releases/download/v${PACKAGE_VERSION}/kubeconform-linux-amd64.tar.gz
|
||||||
|
|
||||||
|
# Extract the binary
|
||||||
|
tar -xzf /app/kubeconform-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
rpms/kubeconform/resources/nfpm.yaml
Normal file
39
rpms/kubeconform/resources/nfpm.yaml
Normal 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:
|
||||||
|
- kubeconform
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- kubeconform
|
||||||
|
|
||||||
|
# Files to include in the package
|
||||||
|
contents:
|
||||||
|
- src: /app/kubeconform
|
||||||
|
dst: /usr/bin/kubeconform
|
||||||
|
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
|
||||||
@ -651,8 +651,8 @@ def build_package_docker(
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Ensure dist directory exists with repository structure
|
# Ensure dist directory exists with repository structure (no package subdirectory)
|
||||||
package_dist_dir = dist_dir / repository / package_name
|
package_dist_dir = dist_dir / repository
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
package_dist_dir.mkdir(parents=True, exist_ok=True)
|
package_dist_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user