Skip to content

Commit

Permalink
tweak buildbuddy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbreen committed Sep 15, 2023
1 parent 568ffd4 commit be454b1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
8 changes: 2 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:docker --experimental_docker_use_customized_images # If enabled we'll nee
build:docker --strategy=CppCompile=docker --strategy=CppLink=docker --strategy=CcStrip=docker --strategy=MakeRpm=docker
build:docker --experimental_docker_privileged # For SELinux

build:remote --strategy=CppCompile=remote --strategy=CppLink=remote --strategy=CcStrip=remote --strategy=MakeRpm=remote
#build:remote --strategy=CppCompile=remote --strategy=CppLink=remote --strategy=CcStrip=remote --strategy=MakeRpm=remote
test:remote --strategy=remote

build:remote --bes_results_url=http://localhost:8080/invocation/
Expand All @@ -23,10 +23,6 @@ build:remote --remote_timeout=120
build:remote --remote_executor=grpc://localhost:1985
build:remote --remote_header=x-buildbuddy-api-key=M3LUl7prhCCaqVCUAb18

build --incompatible_enable_cc_toolchain_resolution # appears to be on by default in 6.2.1?

#build --toolchain_resolution_debug @bazel_tools//tools/cpp:toolchain_type
#build --toolchain_resolution_debug @rules_pkg.*//toolchains/rpm:rpmbuild_toolchain_type

build --incompatible_enable_cc_toolchain_resolution
build --experimental_platforms_api

14 changes: 14 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files")
load(":defs.bzl", "platforms", "platforms_test")
load("@rules_cc//cc:defs.bzl", "cc_binary")

genrule(
name = "trivial",
srcs = ["hello.c"],
outs = ["trivial.txt"],
cmd = """
exec | tee $@
pwd
cat /etc/os-release
find -ls
stat hello.c
""",
)

# Not built directly, but if done so will fail to build as CppCompile etcetera
# are configured to *only* build in a container.
# This *can* be built directly in an arbitrary container by overriding the
Expand Down Expand Up @@ -56,6 +69,7 @@ sh_test(
srcs = ["hello.test.sh"],
args = ["$(rootpaths :hellos)"],
data = [":hellos"],
local = True,
)

# Not executed directly, but if done so will fail to build :hello as above.
Expand Down
12 changes: 4 additions & 8 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ services:
- mysql:/var/lib/mysql
healthcheck:
test: [CMD-SHELL, "mariadb -u$${MYSQL_USER?} -p$${MYSQL_PASSWORD?} $${MYSQL_DATABASE?}"]
start_period: 15s
redis:
image: redis:latest
volumes:
Expand Down Expand Up @@ -51,16 +50,13 @@ services:
depends_on:
- app
image: gcr.io/flame-public/buildbuddy-executor-enterprise:latest
privileged: true
command:
- "--app.build_buddy_url=http://app:8080"
- "--app.cache_api_url=grpc://app:1985"
- "--app.default_redis_target=redis:6379"
- "--auth.enable_anonymous_usage=true"
- "--auth.enable_self_auth=true"
- "--database.data_source=mysql://buildbuddy:buildbuddy@tcp(mysql)/buildbuddy"
- "--executor.app_target=grpc://app:1985"
- "--executor.local_cache_size_bytes=5368709120"
- "--executor.docker_socket=/var/run/docker.sock"
- "--executor.root_directory=/var/tmp/buildbuddy"
- "--executor.disable_local_cache=true"
volumes:
- /buildbuddy
- /var/tmp/buildbuddy:/var/tmp/buildbuddy:rw
- /var/run/docker.sock:/var/run/docker.sock

0 comments on commit be454b1

Please sign in to comment.