Skip to content

Commit

Permalink
Merge pull request #804 from rebortg/T973_frr_exporter
Browse files Browse the repository at this point in the history
T973: add build script for frr_exporter package
  • Loading branch information
c-po authored Oct 9, 2024
2 parents 9eb61d3 + b3460ca commit 910eece
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/trigger_rebuild_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions scripts/package-build/frr_exporter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
frr_exporter /
*.buildinfo
*.build
*.changes
*.deb
*.dsc
1 change: 1 addition & 0 deletions scripts/package-build/frr_exporter/build.py
22 changes: 22 additions & 0 deletions scripts/package-build/frr_exporter/package.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>" \
--description "Prometheus exporter for FRR" \
--license Apache-2.0 -C debian --package ..
"""

0 comments on commit 910eece

Please sign in to comment.