Event-based Scripting for Kubernetes.
Clone or download
vdice Merge pull request #658 from kooba/fix-docs
Fix brig run file flag
Latest commit 2c74836 Oct 15, 2018
Failed to load latest commit information.
brig fix(*): address linting errors, add test-style to brigade build task Oct 10, 2018
brigade-api fix(*): address linting errors, add test-style to brigade build task Oct 10, 2018
brigade-controller bump alpine to 3.8 Oct 3, 2018
brigade-cr-gateway bump alpine to 3.8 Oct 3, 2018
brigade-github-gateway bump alpine to 3.8 Oct 3, 2018
brigade-vacuum fix(*): address linting errors, add test-style to brigade build task Oct 10, 2018
brigade-worker Brigade release v0.18.0 Oct 9, 2018
charts Brigade release v0.18.0 Oct 9, 2018
docs Fix brig run file flag Oct 11, 2018
git-sidecar Fix invalid_format for Git SSH Keys. (#647) Oct 4, 2018
pkg fix(*): address linting errors, add test-style to brigade build task Oct 10, 2018
scripts ref(*): remove label for commit_id Mar 1, 2018
tests ref(tests): remove generator from functional tests (#377) Mar 16, 2018
.eslintrc.js feat(js): make `project` a global JS var (#75) Jul 14, 2017
.gitignore chore(*): git ignore swp files Jun 26, 2018
Gopkg.lock feat(brig): Interactive prompt for creating projects (#534) Jul 24, 2018
Gopkg.toml feat(brig): Interactive prompt for creating projects (#534) Jul 24, 2018
LICENSE rename LICENSE.txt to LICENSE Oct 23, 2017
Makefile ref(Makefile/brigade.js): append .exe to Windows binary at build stage Oct 12, 2018
README.md Add brigade-exporter to related projects section on the readme Sep 5, 2018
brigade.js ref(Makefile/brigade.js): append .exe to Windows binary at build stage Oct 12, 2018
code-of-conduct.md add link to Microsoft's Code of Conduct May 16, 2018
draft.toml chore(*): brigade rename (#225) Oct 11, 2017
gometalinter.json chore(Makefile): refactor lint and format (#374) Mar 15, 2018


Brigade: Event-based Scripting for Kubernetes

Build Status

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.


The Brigade Technology Stack

  • 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 design introduction introduces Brigade concepts and architecture.


  1. Install Brigade
  2. Install brig
  3. Create a Brigade project
  4. 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.

Creating A New Project

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

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.)

Related Projects

Brigade ❤️ Developers

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.