-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrebar.config
233 lines (205 loc) · 8.48 KB
/
rebar.config
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
%% behaviours should be compiled before other files
{erl_first_files, [
"src/http/rest/translators/rest_translator_behaviour.erl",
"src/auth/idp_auth_protocol_behaviour.erl",
"src/auth/onezone_plugin_behaviour.erl",
"src/auth/openid_plugin_behaviour.erl",
"src/auth/entitlement_mapping/entitlement_parser_behaviour.erl",
"src/auth/attribute_mapping/attribute_mapper_behaviour.erl"
]}.
{clean_files, [
"test/eunit_results",
"test_distributed/*.beam",
"test_distributed/logs/*"
]}.
{cover_enabled, true}.
{dialyzer, [
{warnings, [error_handling, unknown]},
{plt_extra_apps, [
ssl, eunit, common_test, compiler, jiffy, ranch, cowboy, cowlib,
gen_server2, worker_pool, poolboy, base64url, dns, erldns, cberl,
macaroons, ctool, gui, bp_tree, cluster_worker, gen_smtp
]}
]}.
%% eunit opts - Maven-like output formatting
{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "./test/eunit_results"}]}}]}.
{deps, [
{compatibility_reference, {raw, {git, "ssh://[email protected]:7999/vfs/compatibility-reference.git", {ref, "afaafcbba44a"}}}},
{ctool, {git, "ssh://[email protected]:7999/vfs/ctool.git", {ref, "faa2ee73aad9"}}},
{cluster_manager, {raw, {git, "ssh://[email protected]:7999/vfs/cluster-manager.git", {ref, "b0184b1d58c2"}}}},
{cluster_worker, {git, "ssh://[email protected]:7999/vfs/cluster-worker.git", {ref, "5f60d8f924ae"}}},
{esaml, {git, "https://github.com/onedata/esaml.git", {ref, "3716e0631666"}}},
{gen_smtp, {git, "git://github.com/Vagabond/gen_smtp.git", {tag, "1.2.0"}}},
{erldns, {git, "https://github.com/wgslr/erl-dns.git", {ref, "3b55aac"}}},
% overrides the base32 reference from erldns
{base32, {git, "https://github.com/dnsimple/base32_erlang.git", {ref, "8b1ebce"}}},
% overrides the recon reference from erldns
{recon, "2.5.1"},
{onenv_ct, {git, "ssh://[email protected]:7999/vfs/onenv-ct.git", {ref, "bec8e5cfb0650b3"}}}
]}.
%% plugins
{plugins, [rebar3_hex, rebar3_elixir,
{rebar_raw_resource, {git, "https://github.com/alertlogic/rebar_raw_resource", {branch, "master"}}}
]}.
{erl_opts, [
fail_on_warning,
debug_info,
{src_dirs, ["src"]}
]}.
{pre_hooks, [
%% Make dir for eunit' surefire test results
{eunit, "mkdir -p test/eunit_results"},
%% Sometimes, in some cases epmd daemon doesn't
%% start during eunit tests, so we need to force start it
{eunit, "epmd -daemon"}
]}.
{post_hooks, [
{release, "rm -f _build/*/rel/oz_worker/bin/install_upgrade.escript"},
{release, "rm -f _build/*/rel/oz_worker/bin/nodetool"},
{release, "rm -f _build/*/rel/oz_worker/bin/oz_worker-*"},
{release, "rm -f _build/*/rel/oz_worker/bin/start_clean.boot"},
{release, "rm -f _build/*/rel/oz_worker/bin/no_dot_erlang.boot"}
]}.
%% relx configuration
{relx, [
{release, {oz_worker, "1.0.0"},
[
kernel,
stdlib,
xmerl,
sasl,
public_key,
crypto,
ssl,
gui,
% Meck is needed only for development purposes, should be removed before release.
meck,
% All ctool deps will be included in the release package,
% so there is no need to list them here.
ctool,
mnesia,
{cberl, load},
{bp_tree, load},
{cluster_worker, load},
{observer_cli, load},
{gen_server2, load},
%% deps included by default by reltool but not included by relx
{base64url, load},
certifi,
{common_test, load},
{debugger, load},
{edoc, load},
{enacl, load},
{erts, load},
esaml,
{et, load},
{eunit, load},
gen_smtp,
hackney,
inets,
{jiffy, load},
{macaroons, load},
observer,
{runtime_tools, load},
{snmp, load},
{ssh, load},
{wx, load},
% erldns dependencies
proper,
parse_xfrm_utils,
iso8601, % without this one erldns will not start
poolboy,
erldns,
locus,
oz_worker
]},
{vm_args, "rel/files/vm.args"},
{sys_config, "rel/files/app.config"},
{include_src, false},
{dev_mode, true},
% NOTE: {dev_mode, true} expands implicitly to {include_erts, false},
% so we need this line AFTER the dev mode to override this setting
{include_erts, true},
{overlay, [
%% Copy base files for starting and interacting with node
{copy, "node_package/priv/base/erl", "erts-{{erts_vsn}}/bin/erl"},
{copy, "node_package/priv/base/nodetool", "erts-{{erts_vsn}}/bin/nodetool"},
{template, "node_package/priv/base/runner", "bin/oz_worker"},
{template, "node_package/priv/base/env.sh", "lib/env.sh"},
%% Copy static files to the release, to one of the two locations:
%% files in "etc/" end up in "/etc/oz_worker/" in the installation package,
%% they are persisted between upgrades of the system - upgrading
%% Onezone will preserve the files, even if newer default ones are
%% in the new package's etc dir.
{mkdir, "etc"},
%% files in "data/" end up in "/var/lib/oz_worker/" in the installation package,
%% they are NOT persisted between upgrades of the system - upgrading
%% Onezone will overwrite the previous contents of the directory.
{mkdir, "data"},
%% Copy config files
{copy, "rel/files/config.d", "etc/"},
{copy, "rel/files/autogenerated.config", "etc/autogenerated.config"},
{template, "rel/files/autogenerated.vm.args", "etc/autogenerated.vm.args"},
{copy, "rel/files/auth.config", "etc/auth.config"},
{copy, "rel/files/template.auth.config", "etc/template.auth.config"},
%% Copy Geolocation DB (MaxMind) files
{copy, "rel/files/geo-db", "etc/"},
%% Copy cert dirs
{copy, "rel/files/certs", "etc/"},
{copy, "rel/files/cacerts", "etc/"},
{template, "rel/files/app.config", "data/app.config"},
{template, "rel/files/vm.args", "data/vm.args"},
%% Copy the directory with default plugins
{copy, "rel/files/plugins", "data/"},
%% Copy additional data files
{copy, "LICENSE.txt", "data/"},
{copy, "README.md", "data/"},
{copy, "rel/files/empty_zones.erldns.json", "data/"},
{copy, "rel/files/db_browser.sh", "data/"},
% Copy the compatibility reference:
% 1) Default compatibility reference for this software version
{copy,
"_build/default/lib/compatibility_reference/compatibility.json",
"data/compatibility.default.json"
},
% 2) Placeholder for the dynamic compatibility file that can be
% overwritten by a newer registry when such is available. Will not
% overwrite the older one in case of upgrade, as the etc dir is
% persisted.
{copy,
"_build/default/lib/compatibility_reference/compatibility.json",
"etc/compatibility.json"
},
% Onezone GUI static files
{copy, "_build/default/lib/ozw_gui_static.tar.gz", "data/"},
{copy, "_build/default/lib/hrv_gui_static.tar.gz", "data/"},
% Set up gui_static structure
{mkdir, "etc/gui_static"},
{mkdir, "etc/gui_static/ozw"},
{mkdir, "etc/gui_static/ozw/empty"},
{copy, "rel/files/empty_service_page.html", "etc/gui_static/ozw/empty/index.html"},
{mkdir, "etc/gui_static/opw"},
{mkdir, "etc/gui_static/opw/empty"},
{copy, "rel/files/empty_service_page.html", "etc/gui_static/opw/empty/index.html"},
{mkdir, "etc/gui_static/onp"},
{mkdir, "etc/gui_static/onp/empty"},
{copy, "rel/files/empty_service_page.html", "etc/gui_static/onp/empty/index.html"},
{mkdir, "etc/gui_static/hrv"}
]},
{extended_start_script, true}
]}.
%% Profiles configuration
{profiles, [
{package, [
{relx, [{dev_mode, false}]}
]},
{bamboo, [
{relx, [{dev_mode, false}]},
{post_hooks, [
{release, "rm -rf _build/default/rel"},
{release, "mv -f _build/bamboo/rel _build/default"},
{release, "rm -rf _build/default/lib/oz_worker"},
{release, "mv -f _build/bamboo/lib/oz_worker _build/default/lib"}
]}
]}
]}.