bazel-contrib / rules_bazel_integration_test

Rules and macros for executing integration tests that use Bazel. Supports running integration tests with multiple versions of Bazel.
Apache License 2.0
44 stars 9 forks source link

Make bazelisk version configurable #184

Open katre opened 1 year ago

katre commented 1 year ago

As part of #181, Bazelisk will be used to download the Bazel used for tests.

With the legacy WORKSPACE support, the Bazelisk version can be configured in the bazel_binaries call:

bazel_binaries(
    bazelisk_version = "1.17.0",
    versions = [
        "//:.bazelversion",
    ],
)

This is not currently possible with the bzlmod support, and should be added.

Possible syntax (this does not work currently):

bazel_binaries = use_extension(
    "@rules_bazel_integration_test//:extensions.bzl",
    "bazel_binaries",
    dev_dependency = True,
)
bazel_binaries.download(version_file = "//:.bazelversion")
bazel_binaries.use_bazelisk("1.17.0")
use_repo(bazel_binaries, "bazel_binaries")
katre commented 12 months ago

It would also be handy to have a way to use a local (non-hermetic) bazelisk, to help uncommon os/arch setups.