forked from rabbitmq/rabbitmq-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
162 lines (146 loc) · 4.83 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
load("@bazel-erlang//:dialyze.bzl", "plt")
load("@bazel-erlang//:shell.bzl", "shell")
load("elixir_home.bzl", "elixir_home")
load(":rabbitmq_home.bzl", "rabbitmq_home")
load(":rabbitmq_run.bzl", "rabbitmq_run", "rabbitmq_run_command")
load(":rabbitmqctl.bzl", "rabbitmqctl")
exports_files([
"scripts/bazel/rabbitmq-run.sh",
])
# This allows us to
# `bazel build //my/target \
# --//:elixir_home=/path/to/elixir/installation`
elixir_home(
name = "elixir_home",
build_setting_default = "~/.kiex/elixirs/elixir-1.10.4",
visibility = ["//visibility:public"],
)
platform(
name = "erlang_23_platform",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
"@bazel_tools//tools/cpp:clang",
],
exec_properties = {
"OSFamily": "Linux",
# linux-erlang-23.3
"container-image": "docker://pivotalrabbitmq/rabbitmq-server-buildenv@sha256:16439a9c4a519d39acc098fdc4d4002f60d6f19762423e71eac24af85f5fddb7",
},
)
platform(
name = "erlang_24_platform",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
"@bazel_tools//tools/cpp:clang",
],
exec_properties = {
"OSFamily": "Linux",
# linux-erlang-24.0
"container-image": "docker://pivotalrabbitmq/rabbitmq-server-buildenv@sha256:6d9871a3002bd61a09918f789cd5d9fc744a1d01182f010a7eeba66bce9689d2",
},
)
platform(
name = "erlang_git_platform",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
"@bazel_tools//tools/cpp:clang",
],
exec_properties = {
"OSFamily": "Linux",
# linux-erlang-git-master
"container-image": "docker://pivotalrabbitmq/rabbitmq-server-buildenv@sha256:5d4fa38f723186668a497a8ee57e22010187e9347add5d4a7cc199dc13f1493f",
},
)
plt(
name = "base_plt",
visibility = ["//visibility:public"],
)
ALL_PLUGINS = [
"//deps/rabbit:bazel_erlang_lib",
"//deps/rabbitmq_amqp1_0:bazel_erlang_lib",
"//deps/rabbitmq_auth_backend_cache:bazel_erlang_lib",
"//deps/rabbitmq_auth_backend_http:bazel_erlang_lib",
"//deps/rabbitmq_auth_backend_ldap:bazel_erlang_lib",
"//deps/rabbitmq_auth_backend_oauth2:bazel_erlang_lib",
"//deps/rabbitmq_auth_mechanism_ssl:bazel_erlang_lib",
"//deps/rabbitmq_consistent_hash_exchange:bazel_erlang_lib",
"//deps/rabbitmq_event_exchange:bazel_erlang_lib",
"//deps/rabbitmq_federation:bazel_erlang_lib",
"//deps/rabbitmq_federation_management:bazel_erlang_lib",
"//deps/rabbitmq_jms_topic_exchange:bazel_erlang_lib",
"//deps/rabbitmq_management:bazel_erlang_lib",
"//deps/rabbitmq_mqtt:bazel_erlang_lib",
"//deps/rabbitmq_peer_discovery_aws:bazel_erlang_lib",
"//deps/rabbitmq_peer_discovery_consul:bazel_erlang_lib",
"//deps/rabbitmq_peer_discovery_etcd:bazel_erlang_lib",
"//deps/rabbitmq_peer_discovery_k8s:bazel_erlang_lib",
"//deps/rabbitmq_prometheus:bazel_erlang_lib",
"//deps/rabbitmq_random_exchange:bazel_erlang_lib",
"//deps/rabbitmq_recent_history_exchange:bazel_erlang_lib",
"//deps/rabbitmq_sharding:bazel_erlang_lib",
"//deps/rabbitmq_shovel:bazel_erlang_lib",
"//deps/rabbitmq_shovel_management:bazel_erlang_lib",
"//deps/rabbitmq_stomp:bazel_erlang_lib",
"//deps/rabbitmq_stream:bazel_erlang_lib",
"//deps/rabbitmq_stream_management:bazel_erlang_lib",
"//deps/rabbitmq_top:bazel_erlang_lib",
"//deps/rabbitmq_tracing:bazel_erlang_lib",
"//deps/rabbitmq_trust_store:bazel_erlang_lib",
"//deps/rabbitmq_web_dispatch:bazel_erlang_lib",
"//deps/rabbitmq_web_mqtt:bazel_erlang_lib",
"//deps/rabbitmq_web_stomp:bazel_erlang_lib",
]
rabbitmq_home(
name = "broker-home",
plugins = ALL_PLUGINS,
)
rabbitmq_home(
name = "broker-for-cli-tests-home",
testonly = True,
plugins = [
"//deps/rabbit:bazel_erlang_lib",
"//deps/rabbitmq_federation:bazel_erlang_lib",
"//deps/rabbitmq_stomp:bazel_erlang_lib",
"//deps/amqp_client:bazel_erlang_lib",
],
)
rabbitmq_run(
name = "rabbitmq-run",
home = ":broker-home",
visibility = ["//visibility:public"],
)
rabbitmq_run(
name = "rabbitmq-for-cli-tests-run",
testonly = True,
home = ":broker-for-cli-tests-home",
visibility = ["//visibility:public"],
)
# Allow us to `bazel run broker`
# for the equivalent of `make run-broker`
# (though it as of yet includes no plugins)
rabbitmq_run_command(
name = "broker",
rabbitmq_run = ":rabbitmq-run",
subcommand = "run-broker",
)
# `bazel run rabbitmqctl`
rabbitmqctl(
name = "rabbitmqctl",
home = ":broker-home",
visibility = ["//visibility:public"],
)
rabbitmqctl(
name = "rabbitmq-diagnostics",
home = ":broker-home",
)
rabbitmqctl(
name = "rabbitmq-plugins",
home = ":broker-home",
)
shell(
name = "repl",
deps = ALL_PLUGINS,
)