Git Product home page Git Product logo

bshashank / bazel-buildfarm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bazelbuild/bazel-buildfarm

0.0 2.0 0.0 30.86 MB

[WIP] Bazel remote caching and execution service

Home Page: https://bazel.build

License: Apache License 2.0

Python 0.33% Java 84.57% Shell 0.81% Starlark 3.62% Dockerfile 0.03% HTML 1.20% Ruby 0.20% Liquid 0.01% SCSS 1.70% JavaScript 0.69% CSS 6.83% C 0.02%

bazel-buildfarm's Introduction

Bazel Buildfarm

Buildfarm CI Nightly CI Nightly Functionality Test
Build status Build status Build status

This repository hosts the Bazel remote caching and execution system.

Background information on the status of caching and remote execution in bazel can be found in the bazel documentation.

File issues here for bugs or feature requests, and ask questions via build team slack in the #buildfarm channel.

Buildfarm Docs

Usage

All commandline options override corresponding config settings.

Bazel Buildfarm Server

Run via

bazel run //src/main/java/build/buildfarm:buildfarm-server <configfile> [<-p|--port> PORT]

Bazel Buildfarm Worker

Run via

bazel run //src/main/java/build/buildfarm:buildfarm-memory-worker <configfile> [--root ROOT] [--cas_cache_directory CAS_CACHE_DIRECTORY]

Bazel Client

To use the example configured buildfarm with bazel (version 1.0 or higher), you can configure your .bazelrc as follows:

$ cat .bazelrc
build --remote_executor=grpc://localhost:8980

Then run your build as you would normally do.

Debugging

Buildfarm uses Java's Logging framework and outputs all routine behavior to the NICE Level.

You can use typical Java logging configuration to filter these results and observe the flow of executions through your running services. An example logging.properties file has been provided at examples/debug.logging.properties for use as follows:

bazel run //src/main/java/build/buildfarm:buildfarm-server -- --jvm_flag=-Djava.util.logging.config.file=$PWD/examples/debug.logging.properties $PWD/examples/config.memory.yml

and

bazel run //src/main/java/build/buildfarm:buildfarm-memory-worker -- --jvm_flag=-Djava.util.logging.config.file=$PWD/examples/debug.logging.properties $PWD/examples/config.memory.yml

To attach a remote debugger, run the executable with the --debug=<PORT> flag. For example:

bazel run //src/main/java/build/buildfarm:buildfarm-server -- --debug=5005 $PWD/examples/config.memory.yml

Third-party Dependencies

Most third-party dependencies (e.g. protobuf, gRPC, ...) are managed automatically via rules_jvm_external. These dependencies are enumerated in the WORKSPACE with a maven_install artifacts parameter.

Things that aren't supported by rules_jvm_external are being imported as manually managed remote repos via the WORKSPACE file.

Deployments

Buildfarm can be used as an external repository for composition into a deployment of your choice.

Add the following to your WORKSPACE to get access to buildfarm targets, filling in the commit and sha256 values:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

BUILDFARM_EXTERNAL_COMMIT = "<revision commit id>"
BUILDFARM_EXTERNAL_SHA256 = "<sha256 digest of url below>"

http_archive(
    name = "build_buildfarm",
    strip_prefix = "bazel-buildfarm-%s" % BUILDFARM_EXTERNAL_COMMIT,
    sha256 = BUILDFARM_EXTERNAL_SHA256,
    url = "https://github.com/bazelbuild/bazel-buildfarm/archive/%s.zip" % BUILDFARM_EXTERNAL_COMMIT,
)

load("@build_buildfarm//:deps.bzl", "buildfarm_dependencies")

buildfarm_dependencies()

load("@build_buildfarm//:defs.bzl", "buildfarm_init")

buildfarm_init()

load("@maven//:compat.bzl", "compat_repositories")

compat_repositories()

Optionally, if you want to use the buildfarm docker container image targets, you can add this:

load("@build_buildfarm//:images.bzl", "buildfarm_images")

buildfarm_images()

bazel-buildfarm's People

Contributors

werkt avatar luxe avatar 80degreeswest avatar jacobmou avatar abergmeier-dsfishlabs avatar krisstakos avatar ttsugriy avatar philwo avatar dependabot[bot] avatar edbaunton avatar vladmos avatar meteorcloudy avatar thna123459 avatar cushon avatar jiaquan1 avatar buchgr avatar edschouten avatar angusdavis avatar tobbe76 avatar lberki avatar kekxv avatar excitoon avatar simon0191 avatar comius avatar th0br0 avatar mostynb avatar sikrinick avatar ob avatar pmoncadaisla avatar pcj avatar

Watchers

James Cloos avatar Shashank Bharadwaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.