-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
55 lines (46 loc) · 1.25 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
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
# gazelle:prefix github.com/chalko/sb-metrics
gazelle(name = "gazelle")
go_library(
name = "sb-metrics_lib",
srcs = ["main.go"],
importpath = "github.com/chalko/sb-metrics",
visibility = ["//visibility:private"],
deps = [
"//client",
"@com_github_prometheus_client_golang//prometheus:go_default_library",
"@com_github_prometheus_client_golang//prometheus/promhttp:go_default_library",
],
)
go_binary(
name = "sb-metrics",
embed = [":sb-metrics_lib"],
visibility = ["//visibility:public"],
)
go_binary(
name = "sb-metrics_arm",
embed = [":sb-metrics_lib"],
goos = "linux",
goarch ="arm",
visibility = ["//visibility:public"],
)
go_image(
name = "cmm",
binary = ":sb-metrics",
)
go_image(
name = "cmm_arm",
binary = ":sb-metrics_arm",
architecture ="arm",
)
container_push(
name = "push-cmm",
image = ":cmm",
format = "Docker",
registry = "index.docker.io",
repository = "chalko/cmm",
tag = "latest",
)