Brigade 1.0: Event-Driven Scripting for Kubernetes

Table of Contents
Introduction
On October 17, 2017, the Microsoft/Deis team released Brigade 1.0, an event-driven scripting engine that lets you author CI/CD-style workflows in JavaScript and execute them on Kubernetes. Instead of heavyweight pipeline DSLs, Brigade focuses on developer-friendly scripts triggered by webhooks from GitHub, Docker Hub, Azure Container Registry and arbitrary HTTP sources.
Brigade Building Blocks
- Gateways receive external events and translate them into Brigade payloads. The GitHub gateway ships out of the box, with others easily authored in Go or JavaScript.
- Brigade Controller watches for new events, reads a project’s
brigade.js, and launches worker pods. - Workers run Node.js to interpret
brigade.js, orchestrating containerized jobs via the Kubernetes API. - Jobs wrap container images, commands and concurrency options; steps can run sequentially or in parallel, enabling build/test/deploy flows.
Projects are defined with a brigade-project.yaml (Kubernetes Secret) storing repo references, secrets and service principals.
Sample Workflow
const { events, Job } = require("brigadier")
events.on("push", async event => {
let test = new Job("jest-tests", "node:8")
test.tasks = [
"cd /src",
"npm install",
"npm test"
]
let dockerBuild = new Job("publish-image", "docker:17.09")
dockerBuild.privileged = true
dockerBuild.tasks = [
"dockerd-entrypoint.sh &",
"sleep 3",
"docker build -t example/webapp:$BRIGADE_COMMIT .",
"docker push example/webapp:$BRIGADE_COMMIT"
]
await test.run()
await dockerBuild.run()
})
Each event spins up an isolated worker pod, mounts the repo (via brigade-git-sidecar), and executes the JavaScript-defined job graph.
Use Cases
- Lightweight CI/CD for teams wanting GitHub-driven pipelines without Jenkins or Spinnaker overhead.
- ChatOps integrations responding to slash commands that orchestrate Kubernetes jobs.
- Container-native automation such as nightly security scans, config generation or data hydration tasks.
- Prototype glue code combining services (e.g., trigger Helm releases after image pushes).
Operational Notes
- Brigade stores project secrets in Kubernetes; integrate with RBAC/NetworkPolicies to restrict access.
- Worker pods mount Docker-in-Docker for builds; consider Kaniko or
brigade-k8s-jobfor rootless workflows. - Logs stream through
brigadeCLI; long-running pipelines benefit from LogStream/Elastic integration. - Scaling relies on Kubernetes; ensure the cluster has capacity for bursts of worker pods.
Ecosystem Momentum
The 1.0 release arrived alongside:
- Kashti dashboard (alpha) for visualizing projects and job runs.
- Early Azure Container Registry gateway for image-triggered workflows.
- Community scripts targeting Helm releases, Slack notifications and ChartMuseum promotions.
With CNCF Sandbox admission on the horizon, Brigade positioned itself as a flexible, developer-friendly bridge between GitOps tooling and traditional CI pipelines.
Summary
| Aspect | Details |
|---|---|
| Release Date | October 17, 2017 |
| Key Innovations | JavaScript pipelines, event gateways, containerized job orchestration |
| Significance | Opened an accessible path to Kubernetes-native automation without heavyweight CI systems |