https://github.com/calebfroese/rules_bosh
bazel rules for bosh
https://github.com/calebfroese/rules_bosh
Last synced: 6 months ago
JSON representation
bazel rules for bosh
- Host: GitHub
- URL: https://github.com/calebfroese/rules_bosh
- Owner: calebfroese
- License: bsd-3-clause
- Created: 2019-10-10T04:02:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-10T04:02:50.000Z (over 6 years ago)
- Last Synced: 2025-02-01T20:29:31.942Z (over 1 year ago)
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BOSH rules for Bazel
## About
These rules provide support for building BOSH releases using the [Bazel][bazel]
build system. This may be useful to you if you're already using Bazel for
building your project and would like to start using BOSH for deployment.
This project is still in early stages but it can already build valid compiled
releases for BOSH directors.
[bazel]: https://bazel.build/
## Usage
You should familiarize yourself with the [components of a BOSH
release][release] if you haven't already done so. The rules do not use the
standard toolchain to build the release but the basic components are still the
same.
[release]: https://bosh.io/docs/create-release.html
The core API has 3 rules at the moment. Here are some examples below from the
[BPM branch which uses Bazel][bpm-branch] to build its release. I'm still
working on this documentation: expect something more proper in the future.
[bpm-branch]: https://github.com/cloudfoundry-incubator/bpm-release/tree/bazel
``` python
load("@com_github_xoebus_rules_bosh//bosh:def.bzl", "bosh_package")
bosh_package(
name = "bpm",
srcs = [
"//bpm/cmd/bpm",
],
)
```
``` python
load("@com_github_xoebus_rules_bosh//bosh:def.bzl", "bosh_release")
bosh_release(
name = "bpmrelease",
jobs = [
"//bosh/jobs/bpm:bpm",
"//bosh/jobs/test-server:test-server",
],
packages = [
":bpm",
":bpm-runc",
":test-server",
],
stemcell_distro = "ubuntu-trusty",
stemcell_version = "1234",
)
```
``` python
load("@com_github_xoebus_rules_bosh//bosh:def.bzl", "bosh_job")
bosh_job(
name = "bpm",
monit = ":monit",
spec = ":spec",
templates = [
"templates/bpm",
"templates/pre-start.erb",
"templates/setup.erb",
],
visibility = ["//bosh:__pkg__"],
)
```