-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
132 lines (124 loc) · 4.13 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
load("@gazelle//:def.bzl", "gazelle")
load("@rules_go//go:def.bzl", "go_binary", "go_library", "nogo")
load("@rules_pkg//:pkg.bzl", "pkg_deb", "pkg_tar")
# gazelle:prefix mgit.at/prometheus-mgit-exporter
gazelle(name = "gazelle")
go_library(
name = "prometheus-mgit-exporter_lib",
srcs = [
"certfile.go",
"elk.go",
"exec.go",
"fstab.go",
"main.go",
"mcelog.go",
"mysqlbin.go",
"ptheartbeat.go",
"rasdaemon.go",
],
importpath = "mgit.at/prometheus-mgit-exporter",
visibility = ["//visibility:private"],
deps = [
"@com_github_mattn_go_zglob//:go-zglob",
"@com_github_pkg_errors//:errors",
"@com_github_prometheus_client_golang//prometheus",
"@com_github_prometheus_client_golang//prometheus/promhttp",
"@org_modernc_sqlite//:sqlite",
],
)
go_binary(
name = "prometheus-mgit-exporter",
embed = [":prometheus-mgit-exporter_lib"],
pure = "on",
visibility = ["//visibility:public"],
)
go_binary(
name = "prometheus-mgit-exporter-arm64",
embed = [":prometheus-mgit-exporter_lib"],
goarch = "arm64",
goos = "linux",
pure = "on",
visibility = ["//visibility:public"],
)
pkg_tar(
name = "debian-data",
extension = "tar.gz",
files = {
":prometheus-mgit-exporter": "/usr/bin/prometheus-mgit-exporter",
":config.json": "/etc/prometheus-mgit-exporter/config.json",
":prometheus-mgit-exporter.service": "/lib/systemd/system/prometheus-mgit-exporter.service",
":README.md": "/usr/share/doc/prometheus-mgit-exporter/README.md",
":LICENSE": "/usr/share/doc/prometheus-mgit-exporter/LICENSE",
},
modes = {
"/usr/bin/prometheus-mgit-exporter": "0755",
"/etc/prometheus-mgit-exporter/config.json": "0644",
"/lib/systemd/system/prometheus-mgit-exporter.service": "0644",
"/usr/share/doc/prometheus-mgit-exporter/README.md": "0644",
"/usr/share/doc/prometheus-mgit-exporter/LICENSE": "0644",
},
)
pkg_tar(
name = "debian-data-arm64",
extension = "tar.gz",
files = {
":prometheus-mgit-exporter-arm64": "/usr/bin/prometheus-mgit-exporter",
":config.json": "/etc/prometheus-mgit-exporter/config.json",
":prometheus-mgit-exporter.service": "/lib/systemd/system/prometheus-mgit-exporter.service",
":README.md": "/usr/share/doc/prometheus-mgit-exporter/README.md",
":LICENSE": "/usr/share/doc/prometheus-mgit-exporter/LICENSE",
},
modes = {
"/usr/bin/prometheus-mgit-exporter": "0755",
"/etc/prometheus-mgit-exporter/config.json": "0644",
"/lib/systemd/system/prometheus-mgit-exporter.service": "0644",
"/usr/share/doc/prometheus-mgit-exporter/README.md": "0644",
"/usr/share/doc/prometheus-mgit-exporter/LICENSE": "0644",
},
)
pkg_deb(
name = "debian",
architecture = "amd64",
built_using = "bazel",
conffiles = [
"/etc/prometheus-mgit-exporter/config.json\n",
],
data = ":debian-data",
description = "A collection of useful monitoring for Prometheus by mgIT GmbH.",
homepage = "https://mgit.at/",
maintainer = "Jonas Reindl <[email protected]>",
package = "prometheus-mgit-exporter",
tags = [
"repo:dpkg-bookworm",
"repo:dpkg-bullseye",
"repo:dpkg-buster",
"repo:dpkg-stretch",
"repo:dpkg-jammy",
"repo:dpkg-focal",
"repo:dpkg-bionic",
"repo:dpkg-xenial",
"repo:dpkg-noble",
],
version = "1.10.0",
visibility = ["//visibility:public"],
)
pkg_deb(
name = "debian-arm64",
architecture = "arm64",
built_using = "bazel",
conffiles = [
"/etc/prometheus-mgit-exporter/config.json\n",
],
data = ":debian-data-arm64",
description = "A collection of useful monitoring for Prometheus by mgIT GmbH.",
homepage = "https://mgit.at/",
maintainer = "Jonas Reindl <[email protected]>",
package = "prometheus-mgit-exporter",
tags = [
"repo:dpkg-bookworm",
"repo:dpkg-bullseye",
"repo:dpkg-buster",
],
version = "1.10.0",
visibility = ["//visibility:public"],
)