diff options
author | rebortg <github@ghlr.de> | 2024-10-08 14:49:31 +0200 |
---|---|---|
committer | rebortg <github@ghlr.de> | 2024-10-08 14:49:31 +0200 |
commit | b3460ca1214f931ceb493e1ba32251f69b3471f2 (patch) | |
tree | 5080df54fb164253e621f5c01b7a4b9aa6e0b0d7 | |
parent | 9eb61d3b6cf426334fd86dfc930b6af468d1aabe (diff) | |
download | vyos-build-b3460ca1214f931ceb493e1ba32251f69b3471f2.tar.gz vyos-build-b3460ca1214f931ceb493e1ba32251f69b3471f2.zip |
T973: add build script for frr_exporter package
-rw-r--r-- | .github/workflows/trigger_rebuild_packages.yml | 6 | ||||
-rw-r--r-- | scripts/package-build/frr_exporter/.gitignore | 6 | ||||
l--------- | scripts/package-build/frr_exporter/build.py | 1 | ||||
-rw-r--r-- | scripts/package-build/frr_exporter/package.toml | 22 |
4 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/trigger_rebuild_packages.yml b/.github/workflows/trigger_rebuild_packages.yml index 6429671a..4355ecb8 100644 --- a/.github/workflows/trigger_rebuild_packages.yml +++ b/.github/workflows/trigger_rebuild_packages.yml @@ -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 diff --git a/scripts/package-build/frr_exporter/.gitignore b/scripts/package-build/frr_exporter/.gitignore new file mode 100644 index 00000000..4880abf9 --- /dev/null +++ b/scripts/package-build/frr_exporter/.gitignore @@ -0,0 +1,6 @@ +frr_exporter / +*.buildinfo +*.build +*.changes +*.deb +*.dsc diff --git a/scripts/package-build/frr_exporter/build.py b/scripts/package-build/frr_exporter/build.py new file mode 120000 index 00000000..3c76af73 --- /dev/null +++ b/scripts/package-build/frr_exporter/build.py @@ -0,0 +1 @@ +../build.py
\ No newline at end of file diff --git a/scripts/package-build/frr_exporter/package.toml b/scripts/package-build/frr_exporter/package.toml new file mode 100644 index 00000000..1c87d496 --- /dev/null +++ b/scripts/package-build/frr_exporter/package.toml @@ -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 .. +""" |