Script simple and complex workflows using JavaScript. Chain together containers, running them in parallel or serially. Fire scripts based on times, GitHub events, Docker pushes, or any other trigger. Brigade is the tool for creating pipelines for Kubernetes.
- JavaScript scripting
- Project-based management
- Configurable event hooks
- Easy construction of pipelines
- Check out the docs to get started.
- Brigade ❤️ JavaScript: Writing Brigade pipelines is as easy as writing a few lines of JavaScript.
- Brigade ❤️ Kubernetes: Brigade is Kubernetes-native. Your builds are translated into pods, secrets, and services
- Brigade ❤️ Docker: No need for special plugins or elaborate extensions. Brigade uses off-the-shelf Docker images to run your jobs. And Brigade also supports DockerHub webhooks.
- Brigade ❤️ GitHub: Brigade comes with built-in support for GitHub, DockerHub, and other popular web services. And it can be easily extended to support your own services.
The de#troduction introduces Brigade concepts and architecture.
- Install Brigade
- Install
brig
- Create a Brigade project
- Write and run a Brigade script
The easiest way to install Brigade into your Kubernetes cluster is to install it using Helm.
$ helm repo add brigade https://azure.github.io/brigade
$ helm install -n brigade brigade/brigade
You will now have Brigade installed.
In your local environment, install brig
, the Brigade commandline client. To get
the latest version, go to the releases page
and download the binary for your platform. Alternatively, you can use
asdf-brig to install & manage multiple
versions of brig
.
To create a new project, use brig project create
and answer the prompts. Make
sure you are pointing to the same Kubernetes cluster and namespace that you
installed Brigade into.
For Brigade 0.15 and earlier: To create new projects, use the brigade-project
Helm chart. While inside the Git
repository cloned above, run these commands:
$ helm inspect values brigade/brigade-project > myvalues.yaml
$ # edit myvalues.yaml
When editing myvalues.yaml
, follow the instructions in that file for configuring
your new project. Once you have customized that file, you can install the project
based on your new configuration by passing it with -f myvalues.yaml
.
$ helm install --name my-project brigade/brigade-project -f myvalues.yaml
The Helm chart will be removed before Brigade 1.0.0, so we recommend using
brig project create
instead. Note that the projects created with the Helm chart
remain compatible with Brigade.
Creating your first brigade.js
is as easy as this:
const { events } = require("brigadier");
events.on("exec", (brigadeEvent, project) => {
console.log("Hello world!");
});
Check out the tutorial for more on creating scripts.
Assuming you named your project deis/empty-testbed
, you can run a brigade.js
file like this:
$ brig run -f brigade.js deis/empty-testbed
This will show you the detailed output of running your brigade.js
script's
exec
hook.
(To see the names of your projects, run brig project list
.)
- Kashti - a dashboard for your Brigade pipelines.
- Brigadeterm - a simple terminal ui for brigade pipelining system.
- Brigade exporter - a Prometheus exporter to gather metrics from Brigade.
- Gateways
- BitBucket events: Gateway Support for BitBucket repositories
- GitLab events: Gateway Support for GitLab repositories
- Kubernetes events: Gateway that listens to Kubernetes event stream
- Event Grid gateway: Gateway for Azure Event Grid events
- Cron Gateway: Schedule events to run at a particular time
- Trello and Generic Webhooks: Experimental gateway for Trello and for generic webhooks
- Draft Pack for Building Custom Gateways: Build your own gateway in 5 minutes
To get started head to the developer's guide
Brigade is well-tested on Minikube and Azure Container Services.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.