Skip to content

Commit 343d3b9

Browse files
Introduce a before build script
Preparing for rabbitmq/rabbitmq-management#236 to land.
1 parent fcbe79c commit 343d3b9

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ spec/reports
1515
test/tmp
1616
test/version_tmp
1717
tmp
18-
bin/*
18+
bin/autospec
19+
bin/bundler
20+
bin/rspec
21+
bin/ldiff
22+
bin/htmldiff

bin/before_build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
${RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL:="sudo rabbitmqctl"}
4+
5+
# guest:guest has full access to /
6+
7+
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL add_vhost /
8+
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL add_user guest guest
9+
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL set_permissions -p / guest ".*" ".*" ".*"
10+
11+
# Reduce retention policy for faster publishing of stats
12+
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL eval 'supervisor2:terminate_child(rabbit_mgmt_sup_sup, rabbit_mgmt_sup), application:set_env(rabbitmq_management, sample_retention_policies, [{global, [{605, 1}]}, {basic, [{605, 1}]}, {detailed, [{10, 1}]}]), rabbit_mgmt_sup_sup:start_child().'

0 commit comments

Comments
 (0)