{"id":15901175,"url":"https://github.com/buildfarm/buildfarm","last_synced_at":"2026-02-14T20:13:41.345Z","repository":{"id":37538501,"uuid":"96434626","full_name":"buildfarm/buildfarm","owner":"buildfarm","description":"Bazel remote caching and execution service","archived":false,"fork":false,"pushed_at":"2024-10-29T18:50:16.000Z","size":40682,"stargazers_count":662,"open_issues_count":180,"forks_count":212,"subscribers_count":46,"default_branch":"main","last_synced_at":"2024-10-29T20:44:14.206Z","etag":null,"topics":["bazel","caching","remote-execution"],"latest_commit_sha":null,"homepage":"https://buildfarm.github.io/buildfarm/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildfarm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-06T13:42:14.000Z","updated_at":"2024-10-29T18:49:21.000Z","dependencies_parsed_at":"2023-10-24T07:35:18.365Z","dependency_job_id":"0e9bd9de-f8c4-46a0-b6a5-b7d800e64c85","html_url":"https://github.com/buildfarm/buildfarm","commit_stats":null,"previous_names":["buildfarm/buildfarm"],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildfarm%2Fbuildfarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildfarm%2Fbuildfarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildfarm%2Fbuildfarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildfarm%2Fbuildfarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildfarm","download_url":"https://codeload.github.com/buildfarm/buildfarm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236903093,"owners_count":19222999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazel","caching","remote-execution"],"created_at":"2024-10-06T11:01:49.967Z","updated_at":"2025-10-18T04:31:18.242Z","avatar_url":"https://github.com/buildfarm.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# Buildfarm\n\n![Build status](https://badge.buildkite.com/45f4fd4c0cfb95f7705156a4119641c6d5d6c310452d6e65a4.svg?branch=main)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/buildfarm/buildfarm/badge)](https://securityscorecards.dev/viewer/?uri=github.com/buildfarm/buildfarm)\n![GitHub License](https://img.shields.io/github/license/buildfarm/buildfarm)\n![GitHub Release](https://img.shields.io/github/v/release/buildfarm/buildfarm)\n![Docker Pulls](https://img.shields.io/docker/pulls/bazelbuild/buildfarm-server)\n\n\nThis repository hosts a [remote caching and execution](https://github.com/bazelbuild/remote-apis) system, compatible with the build systems [Bazel](https://bazel.build), buck2, pants, and more.\n\nBackground information on the status of caching and remote execution in bazel can be\nfound in the [bazel documentation](https://docs.bazel.build/versions/master/remote-caching.html).\n\nFile issues here for bugs or feature requests, and ask questions via build team [slack](https://join.slack.com/t/buildteamworld/shared_invite/zt-4zy8f5j5-KwiJuBoAAUorB_mdQHwF7Q) in the #buildfarm channel.\n\n[Buildfarm Docs](https://buildfarm.github.io/buildfarm/)\n\n## Usage\n\nAll commandline options override corresponding config settings.\n\n### Redis\n\nRun via\n\n```shell\n$ docker run -d --rm --name buildfarm-redis -p 6379:6379 redis:7.2.4\nredis-cli config set stop-writes-on-bgsave-error no\n```\n\n### Buildfarm Server\n\nRun via\n\n```shell\n$ bazelisk run //src/main/java/build/buildfarm:buildfarm-server -- \u003clogfile\u003e \u003cconfigfile\u003e\n\nEx: bazelisk run //src/main/java/build/buildfarm:buildfarm-server -- --jvm_flag=-Djava.util.logging.config.file=$PWD/examples/logging.properties $PWD/examples/config.minimal.yml\n```\n**`logfile`** has to be in the [standard java util logging format](https://docs.oracle.com/cd/E57471_01/bigData.100/data_processing_bdd/src/rdp_logging_config.html) and passed as a --jvm_flag=-Dlogging.config=file:\n**`configfile`** has to be in [yaml format](https://buildfarm.github.io/buildfarm/docs/configuration).\n\n### Buildfarm Worker\n\nRun via\n\n```shell\n$ bazelisk run //src/main/java/build/buildfarm:buildfarm-shard-worker -- \u003clogfile\u003e \u003cconfigfile\u003e\n\nEx: bazelisk run //src/main/java/build/buildfarm:buildfarm-shard-worker -- --jvm_flag=-Djava.util.logging.config.file=$PWD/examples/logging.properties $PWD/examples/config.minimal.yml\n\n```\n**`logfile`** has to be in the [standard java util logging format](https://docs.oracle.com/cd/E57471_01/bigData.100/data_processing_bdd/src/rdp_logging_config.html) and passed as a --jvm_flag=-Dlogging.config=file:\n**`configfile`** has to be in [yaml format](https://buildfarm.github.io/buildfarm/docs/configuration).\n\n### Bazel Client\n\nTo use the example configured buildfarm with bazel (version 1.0 or higher), you can configure your `.bazelrc` as follows:\n\n```shell\n$ cat .bazelrc\n$ build --remote_executor=grpc://localhost:8980\n```\n\nThen run your build as you would normally do.\n\n### Debugging\n\nBuildfarm uses [Java's Logging framework](https://docs.oracle.com/javase/10/core/java-logging-overview.htm) and outputs all routine behavior to the NICE [Level](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html).\n\nYou can use typical Java logging configuration to filter these results and observe the flow of executions through your running services.\nAn example `logging.properties` file has been provided at [examples/logging.properties](examples/logging.properties) for use as follows:\n\n```shell\n$ bazel run //src/main/java/build/buildfarm:buildfarm-server -- --jvm_flag=-Djava.util.logging.config.file=$PWD/examples/logging.properties $PWD/examples/config.minimal.yml\n```\n\nand\n\n``` shell\n$ bazel run //src/main/java/build/buildfarm:buildfarm-shard-worker -- --jvm_flag=-Djava.util.logging.config.file=$PWD/examples/logging.properties $PWD/examples/config.minimal.yml\n```\n\nTo attach a remote debugger, run the executable with the `--debug=\u003cPORT\u003e` flag. For example:\n\n```shell\n$ bazel run //src/main/java/build/buildfarm:buildfarm-server -- --debug=5005 $PWD/examples/config.minimal.yml\n```\n\n\n### Third-party Dependencies\n\nMost third-party dependencies (e.g. protobuf, gRPC, ...) are managed automatically via\n[rules_jvm_external](https://github.com/bazelbuild/rules_jvm_external). These dependencies are enumerated in\nthe WORKSPACE with a `maven_install` `artifacts` parameter.\n\nThings that aren't supported by `rules_jvm_external` are being imported as manually managed remote repos via\nthe `WORKSPACE` file.\n\n### Deployments\n\nBuildfarm can be used as an external repository for composition into a deployment of your choice.\nSee also the documentation site in the [Worker Execution Environment](https://buildfarm.github.io/buildfarm/docs/architecture/worker-execution-environment/) section.\n\nAdd the following to your `MODULE.bazel` to get access to buildfarm targets, filling in the `\u003cCOMMIT-SHA\u003e` values:\n\n```starlark\nbazel_dep(name = \"build_buildfarm\")\ngit_override(\n    module_name = \"build_buildfarm\",\n    commit = \"\u003cCOMMIT-SHA\u003e\",\n    remote = \"https://github.com/buildfarm/buildfarm.git\",\n)\n\n# Transitive!\n# TODO: remove this after https://github.com/bazelbuild/remote-apis/pull/293 is merged\nbazel_dep(name = \"remoteapis\", version = \"eb433accc6a666b782ea4b787eb598e5c3d27c93\")\narchive_override(\n    module_name = \"remoteapis\",\n    integrity = \"sha256-68wzxNAkPZ49/zFwPYQ5z9MYbgxoeIEazKJ24+4YqIQ=\",\n    strip_prefix = \"remote-apis-eb433accc6a666b782ea4b787eb598e5c3d27c93\",\n    urls = [\n        \"https://github.com/bazelbuild/remote-apis/archive/eb433accc6a666b782ea4b787eb598e5c3d27c93.zip\",\n    ],\n)\n\nbazel_dep(name = \"googleapis\", version = \"0.0.0-20240326-1c8d509c5\", repo_name = \"com_google_googleapis\")\nbazel_dep(name = \"grpc-java\", version = \"1.62.2\")\n\ngoogleapis_switched_rules = use_extension(\"@googleapis//:extensions.bzl\", \"switched_rules\")\ngoogleapis_switched_rules.use_languages(\n    grpc = True,\n    java = True,\n)\nuse_repo(googleapis_switched_rules, \"com_google_googleapis_imports\")\n\n```\n\nYou can then use the existing layer targets to build your own OCI images, for example:\n\n``` starlark\noci_image(\n    name = \"mycompany-buildfarm-server\",\n    base = \"@\u003cYOUPROVIDE\u003e\",\n    entrypoint = [\n        \"/usr/bin/java\",\n        \"-jar\",\n        \"/app/build_buildfarm/buildfarm-server_deploy.jar\",\n    ],\n    tars = [\n        \"@build_buildfarm//:layer_buildfarm_server\",\n    ],\n)\n```\n\nwhere `@\u003cYOUPROVIDE\u003e` is the name of an `oci.pull(name = 'YOUPROVIDE', ...)` in your `MODULE.bazel`\n\n### Helm Chart\n\nTo install OCI bundled Helm chart:\n\n```bash\nhelm install \\\n  -n bazel-buildfarm \\\n  --create-namespace \\\n  bazel-buildfarm \\\n  oci://ghcr.io/buildfarm/buildfarm \\\n  --version \"0.4.1\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildfarm%2Fbuildfarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildfarm%2Fbuildfarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildfarm%2Fbuildfarm/lists"}