feat: add cni-plugins
- add 1.6.1 cni-plugins - ignore the scripts folder in make list
This commit is contained in:
parent
3cbe7f9a83
commit
f84bd17e1b
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ RPMS_DIR := $(ROOT_DIR)/rpms
|
||||
REPO_OPTIONS := --disablerepo=* --enablerepo=unkin
|
||||
|
||||
# Automatically find all package/version directories
|
||||
PACKAGES := $(shell find $(RPMS_DIR) -mindepth 2 -maxdepth 2 -type d | sed "s|$(RPMS_DIR)/||")
|
||||
PACKAGES := $(shell find $(RPMS_DIR) -mindepth 2 -maxdepth 2 -type d | sed "s|$(RPMS_DIR)/||" | grep -v "/scripts")
|
||||
|
||||
# Default target to build all packages and versions
|
||||
.PHONY: all list cache build clean
|
||||
|
||||
1
rpms/cni-plugins/1.6.1/release
Normal file
1
rpms/cni-plugins/1.6.1/release
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
25
rpms/cni-plugins/Dockerfile
Normal file
25
rpms/cni-plugins/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
# Start with the AlmaLinux 8.10 base image
|
||||
FROM git.query.consul/unkin/almalinux8-buildagent: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 nfpm.yaml from the context into the container
|
||||
COPY nfpm.yaml /app/nfpm.yaml
|
||||
COPY scripts /app/scripts
|
||||
|
||||
# Download the required files
|
||||
RUN dnf install -y unzip && \
|
||||
wget -O /app/cni-plugins-linux-amd64.tgz https://github.com/containernetworking/plugins/releases/download/v${PACKAGE_VERSION}/cni-plugins-linux-amd64-v${PACKAGE_VERSION}.tgz && \
|
||||
tar xf cni-plugins-linux-amd64.tgz
|
||||
|
||||
# Default command to build RPMs
|
||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
||||
137
rpms/cni-plugins/nfpm.yaml
Normal file
137
rpms/cni-plugins/nfpm.yaml
Normal file
@ -0,0 +1,137 @@
|
||||
# nfpm.yaml
|
||||
|
||||
name: cni-plugins
|
||||
version: ${PACKAGE_VERSION}
|
||||
release: ${PACKAGE_RELEASE}
|
||||
arch: amd64
|
||||
platform: linux
|
||||
section: default
|
||||
priority: extra
|
||||
description: "Some reference and example networking plugins, maintained by the CNI team."
|
||||
|
||||
maintainer: ContainerNetworking
|
||||
homepage: https://github.com/containernetworking/plugins
|
||||
license: Apache-2.0
|
||||
|
||||
disable_globbing: false
|
||||
|
||||
replaces:
|
||||
- cni-plugins
|
||||
|
||||
# Files to include in the package
|
||||
contents:
|
||||
- src: /app/bandwidth
|
||||
dst: /opt/cni/bin/bandwidth
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/bridge
|
||||
dst: /opt/cni/bin/bridge
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/dhcp
|
||||
dst: /opt/cni/bin/dhcp
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/dummy
|
||||
dst: /opt/cni/bin/dummy
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/firewall
|
||||
dst: /opt/cni/bin/firewall
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/host-device
|
||||
dst: /opt/cni/bin/host-device
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/host-local
|
||||
dst: /opt/cni/bin/host-local
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/ipvlan
|
||||
dst: /opt/cni/bin/ipvlan
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/loopback
|
||||
dst: /opt/cni/bin/loopback
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/macvlan
|
||||
dst: /opt/cni/bin/macvlan
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/portmap
|
||||
dst: /opt/cni/bin/portmap
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/ptp
|
||||
dst: /opt/cni/bin/ptp
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/sbr
|
||||
dst: /opt/cni/bin/sbr
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/static
|
||||
dst: /opt/cni/bin/static
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/tap
|
||||
dst: /opt/cni/bin/tap
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/tuning
|
||||
dst: /opt/cni/bin/tuning
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/vlan
|
||||
dst: /opt/cni/bin/vlan
|
||||
file_info:
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/vrf
|
||||
dst: /opt/cni/bin/vrf
|
||||
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
|
||||
2
rpms/cni-plugins/scripts/preinstall.sh
Executable file
2
rpms/cni-plugins/scripts/preinstall.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
mkdir -p /opt/cni/bin
|
||||
Loading…
Reference in New Issue
Block a user