summaryrefslogtreecommitdiff
path: root/deps/rabbitmq_prometheus/BUILD.bazel
blob: cded31e178c3943f23983673bd44ff6b5edf6d0f (plain)
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
load("@rules_erlang//:eunit2.bzl", "eunit")
load("@rules_erlang//:xref2.bzl", "xref")
load("@rules_erlang//:dialyze.bzl", "dialyze", "plt")
load(
    "//:rabbitmq.bzl",
    "RABBITMQ_DIALYZER_OPTS",
    "assert_suites",
    "broker_for_integration_suites",
    "rabbitmq_app",
    "rabbitmq_integration_suite",
)
load(
    ":app.bzl",
    "all_beam_files",
    "all_srcs",
    "all_test_beam_files",
    "test_suite_beam_files",
)

APP_NAME = "rabbitmq_prometheus"

APP_MODULE = "rabbit_prometheus_app"

APP_ENV = """[
	    {return_per_object_metrics, false},
	    {tcp_config, [{port, 15692}]},
	    {ssl_config, []}
]"""

all_beam_files(name = "all_beam_files")

all_test_beam_files(name = "all_test_beam_files")

all_srcs(name = "all_srcs")

test_suite_beam_files(name = "test_suite_beam_files")

# gazelle:erlang_app_dep rabbitmq_management_agent
# gazelle:erlang_app_dep_exclude amqp_client
# gazelle:erlang_app_dep_exclude rabbit_common

rabbitmq_app(
    name = "erlang_app",
    srcs = [":all_srcs"],
    hdrs = [":public_hdrs"],
    app_env = APP_ENV,
    app_module = APP_MODULE,
    app_name = APP_NAME,
    beam_files = [":beam_files"],
    license_files = [":license_files"],
    priv = [":priv"],
    deps = [
        "//deps/rabbit:erlang_app",
        "//deps/rabbitmq_management_agent:erlang_app",
        "//deps/rabbitmq_web_dispatch:erlang_app",
        "@accept//:erlang_app",
        "@cowboy//:erlang_app",
        "@prometheus//:erlang_app",
    ],
)

xref(
    name = "xref",
    target = ":erlang_app",
)

plt(
    name = "deps_plt",
    for_target = ":erlang_app",
    ignore_warnings = True,
    plt = "//:base_plt",
)

dialyze(
    name = "dialyze",
    dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
    plt = ":deps_plt",
    target = ":erlang_app",
)

eunit(
    name = "eunit",
    target = ":test_erlang_app",
)

broker_for_integration_suites()

rabbitmq_integration_suite(
    name = "config_schema_SUITE",
    size = "small",
)

rabbitmq_integration_suite(
    name = "rabbit_prometheus_http_SUITE",
    size = "medium",
    flaky = True,
)

assert_suites()

alias(
    name = "rabbitmq_prometheus",
    actual = ":erlang_app",
    visibility = ["//visibility:public"],
)