Event-driven scripting for Kubernetes.

Brigade is a tool for running scriptable, automated tasks in the cloud — as part of your Kubernetes cluster.

Get Brigade

Simple, powerful pipes

Each project gets a brigade.js config file, which is where you can write dynamic, interwoven pipelines and tasks for your Kubernetes cluster. Leave your YAML at home!

  • // Run unit tests for a Github push
    const { events, Job , Group} = require("brigadier");
    const dest = "$GOPATH/src/github.com/technosophos/ulid";
    events.on("push", (e, p) => {
      var gh = JSON.parse(e.payload)
      var test = new Job("test", "golang:1.9")
      test.tasks = [
        "mkdir -p " + dest,
        "cp -a /src/* " + dest,
        "cd " + dest,
        "go get -u github.com/golang/dep/cmd/dep",
        "dep ensure",
        "make test"
  • // Updating a cosmosDB database
    const { events, Job } = require("brigadier")
    events.on("exec", (e, p) => {
      var mongo = new Job("update-db", "mongo:3.2")
      mongo.storage.enabled = false
      mongo.tasks = [
          dbCmd(p, `db.mydb.insert(${e.payload})`)
    function dbCmd(p, script) {
      return `mongo ${p.secrets.cosmosName}.documents.azure.com:10255/test ` +
        `-u ${p.secrets.cosmosName} -p  ${p.secrets.cosmosKey} --ssl --sslAllowInvalidCertificates ` +
        `--eval '${script}'`
  • // Sending a Slack message
    const { events, Job } = require("brigadier")
    events.on("exec", (e, p) => {
      var slack = new Job("slack-notify", "technosophos/slack-notify:latest", ["/slack-notify"])
      slack.env = {
        SLACK_USERNAME: "Brigade",
        SLACK_TITLE: "Hello from Brigade",
        SLACK_MESSAGE: "This is a message from Brigade"
  • // Sending a Twitter DM
    const { events, Job } = require("brigadier")
    const sendTo = "technosophos"
    events.on("exec", (e, p) => {
      // Create a new job
      const twitter = new Job("tweet", "technosophos/twitter-t:latest")
      twitter.storage.enabled = false
      // Set up the environment variables, copying them from the project.
      twitter.env = {
        OWNER: p.secrets.OWNER,
        CONSUMER_KEY: p.secrets.CONSUMER_KEY,
        ACCESS_TOKEN: p.secrets.ACCESS_TOKEN,
      // Set up the env and send a DM
      twitter.tasks = [
        `t dm ${sendTo} "${p.name} got event ${e.type}"`

Runs inside your cluster

By running Brigade as a service inside your Kubernetes cluster, you can harness the power of millions of available Docker images.

Brigade can be used to chain containers together to build processing pipelines.

  • Watch for incoming requests from services like GitHub, Docker, and Trello
  • Run unit tests, process data, and store results
  • Send notifications through services like Slack and Twitter
Kashti Dashboard

Kashti Dashboard: a place for your pipelines

Output from Brigade can be sent to Kashti — a simple UI to display build results and logs.