Commit Graph

12 Commits

Author SHA1 Message Date
Alexey Lebedeff 25ee098513 Fix `bazel run broker` 2023-03-14 10:51:01 +01:00
Alexey Lebedeff 1868c6176e Allow picking ports for `bazel run broker`
This way multiple brokers can be run at the same time. Before that the
only option was to use `bazel run start-cluster`, but it's not
granular enough to run rabbits from different checkouts or with
different configs.
2023-03-09 18:02:40 +01:00
Michael Klishin 45506b1e1b
rabbitmq-run: make sure that plugin directory is created
for environments where it might not exist, such as the Bazel
sandbox
2022-11-03 14:43:42 +04:00
David Ansari b08ef4583e Add Bazel targets start-cluster and stop-cluster
to have the equivalent of `make start-cluster` and `make stop-cluster`.

To create a 3-node RabbitMQ cluster:
```
bazel run --config=local start-cluster
```
To define number of nodes or a custom directory:
```
bazel run --config=local start-cluster NODES=5 TEST_TMPDIR="$HOME/scratch/myrabbit"
```

To stop the cluster:
```
bazel run --config=local stop-cluster
```
or, if started by the 2nd command:
```
bazel run --config=local stop-cluster NODES=5 TEST_TMPDIR="$HOME/scratch/myrabbit"
```
2022-07-04 13:54:26 +00:00
Philip Kuryloski 2e62cae69e Use rabbitmqctl await_startup instead if erl eval
when starting background nodes for tests
2022-05-04 13:33:03 +02:00
Philip Kuryloski 0a63178a83 Allow the use of RABBITMQ_CONFIG_FILE env var with bazel run broker 2022-02-04 08:57:11 +01:00
Philip Kuryloski 8cc9806f07 Synchronize mixed versions approach with v3.8.x 2021-09-09 13:50:22 +02:00
Philip Kuryloski eec4a04289 Fix a typo in rabbitmq-run.sh 2021-09-08 16:55:35 +02:00
Philip Kuryloski d6399bbb5b
Mixed version testing in bazel (#3200)
Unlike with gnu make, mixed version testing with bazel uses a package-generic-unix for the secondary umbrella rather than the source. This brings the benefit of being able to mixed version test releases built with older erlang versions (even though all nodes will run under the single version given to bazel)

This introduces new test labels, adding a `-mixed` suffix for every existing test. They can be skipped if necessary with `--test_tag_filters` (see the github actions workflow for an example)

As part of the change, it is now possible to run an old release of rabbit with rabbitmq_run rule, such as:

`bazel run @rabbitmq-server-generic-unix-3.8.17//:rabbitmq-run run-broker`
2021-07-19 14:33:25 +02:00
Philip Kuryloski b16274b4ab Update scripts/bazel/rabbitmq-run.sh to match the Makefile version
Previously the log level was hard coded.
`RABBITMQ_LOG=info,+color RABBITMQ_LOGS=- bazel run broker` will log to
the console
2021-06-08 17:31:36 +02:00
Philip Kuryloski 95cad1b2aa Allow plugin selection when running //:broker from bazel 2021-05-25 16:09:31 +02:00
Philip Kuryloski 388654c542
Add a partial Bazel build (#2938)
Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
2021-03-29 11:01:43 +02:00