-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gitlab review stage now use common rabbitmq
- individual branches are distinguished by vhost
- Loading branch information
1 parent
4437743
commit 1e877d0
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash -e | ||
|
||
RABBITMQCTL_EXEC='docker exec ci_rabbitmq_1 rabbitmqctl' | ||
VHOST=$2 | ||
|
||
if [[ "$VHOST" == "" ]]; then | ||
echo "Usage: $0 <create/remove> <vhost>" | ||
exit 1 | ||
fi | ||
|
||
create () { | ||
$RABBITMQCTL_EXEC add_vhost "${VHOST}" | ||
$RABBITMQCTL_EXEC set_permissions -p "${VHOST}" guest ".*" ".*" ".*" | ||
} | ||
|
||
remove() { | ||
$RABBITMQCTL_EXEC delete_vhost "${VHOST}" || true | ||
} | ||
|
||
case $1 in | ||
create) "$@"; exit;; | ||
remove) "$@"; exit;; | ||
*) echo "Usage: $0 <create/remove> <vhost>"; exit 1;; | ||
esac |