T973: add build script for frr_exporter package

This commit is contained in:
rebortg 2024-10-08 14:49:31 +02:00
parent 9eb61d3b6c
commit b3460ca121
4 changed files with 35 additions and 0 deletions

View File

@ -33,6 +33,8 @@ jobs:
- 'scripts/package-build/ethtool/**'
frr:
- 'scripts/package-build/frr/**'
frr_exporter:
- 'scripts/package-build/frr_exporter/**'
hostap:
- 'scripts/package-build/hostap/**'
hsflowd:
@ -117,6 +119,10 @@ jobs:
trigger_build "frr"
fi
if [ "${{ steps.changes.outputs.frr_exporter }}" == "true" ]; then
trigger_build "frr_exporter"
fi
if [ "${{ steps.changes.outputs.hostap }}" == "true" ]; then
trigger_build "hostap"
fi

View File

@ -0,0 +1,6 @@
frr_exporter /
*.buildinfo
*.build
*.changes
*.deb
*.dsc

View File

@ -0,0 +1 @@
../build.py

View File

@ -0,0 +1,22 @@
[[packages]]
name = "frr_exporter"
commit_id = "v1.3.1"
scm_url = "https://github.com/tynany/frr_exporter"
build_cmd = """
# Create the install directory
mkdir -p debian/usr/sbin
make setup_promu
go build
# Move the frr_exporter binary to the install directory
mv frr_exporter debian/usr/sbin
# Build the Debian package
fpm --input-type dir --output-type deb --name frr-exporter \
--version $(git describe --tags --always | cut -c2-) --deb-compression gz \
--maintainer "VyOS Package Maintainers <maintainers@vyos.net>" \
--description "Prometheus exporter for FRR" \
--license Apache-2.0 -C debian --package ..
"""