diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-10-04 07:39:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 07:39:05 +0300 |
commit | c6231a51e80d371ccd9d6acf360feb211d28d1ac (patch) | |
tree | e6a793245c85e9cf33bafe08ab64939601e2198f /scripts/package-build | |
parent | d2c98d1510dcaa3c35a6095eeab51c40a0d5ecea (diff) | |
parent | 40b0d63dcb01c9386f58ce5917fb027c14799910 (diff) | |
download | vyos-build-c6231a51e80d371ccd9d6acf360feb211d28d1ac.tar.gz vyos-build-c6231a51e80d371ccd9d6acf360feb211d28d1ac.zip |
Merge pull request #785 from sever-sever/T973
T973: Add build script for node_exporter package
Diffstat (limited to 'scripts/package-build')
-rw-r--r-- | scripts/package-build/node_exporter/.gitignore | 7 | ||||
l--------- | scripts/package-build/node_exporter/build.py | 1 | ||||
-rw-r--r-- | scripts/package-build/node_exporter/package.toml | 21 |
3 files changed, 29 insertions, 0 deletions
diff --git a/scripts/package-build/node_exporter/.gitignore b/scripts/package-build/node_exporter/.gitignore new file mode 100644 index 00000000..0e010f4d --- /dev/null +++ b/scripts/package-build/node_exporter/.gitignore @@ -0,0 +1,7 @@ +node_exporter/ +*.buildinfo +*.build +*.changes +*.deb +*.dsc + diff --git a/scripts/package-build/node_exporter/build.py b/scripts/package-build/node_exporter/build.py new file mode 120000 index 00000000..3c76af73 --- /dev/null +++ b/scripts/package-build/node_exporter/build.py @@ -0,0 +1 @@ +../build.py
\ No newline at end of file diff --git a/scripts/package-build/node_exporter/package.toml b/scripts/package-build/node_exporter/package.toml new file mode 100644 index 00000000..b0070278 --- /dev/null +++ b/scripts/package-build/node_exporter/package.toml @@ -0,0 +1,21 @@ +[[packages]] +name = "node_exporter" +commit_id = "v1.8.2" +scm_url = "https://github.com/prometheus/node_exporter" + +build_cmd = """ + +# Create the install directory +mkdir -p debian/usr/sbin +make build + +# Move the node_exporter binary to the install directory +mv node_exporter debian/usr/sbin + +# Build the Debian package +fpm --input-type dir --output-type deb --name node-exporter \ + --version $(git describe --tags --always | cut -c2-) --deb-compression gz \ + --maintainer "VyOS Package Maintainers <maintainers@vyos.net>" \ + --description "Prometheus exporter for machine metrics" \ + --license Apache-2.0 -C debian --package .. +""" |