Skip to content
Branch: master
Find file History
krancour and technosophos make worker command configurable globally with a controller flag (#906)
Signed-off-by: Kent Rancourt <>
Latest commit 3879c9d May 9, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/brig make worker command configurable globally with a controller flag (#906) May 9, 2019
rootfs feat(brig): add brig container (#409) Apr 2, 2018
Dockerfile bump alpine to 3.8 Oct 3, 2018 chore(*): update image org to brigadecore Mar 26, 2019

Brig: The Brigade CLI

Brig is a command line tool for interacting with Brigade. It allows Brigade users to learn about their projects and builds, and provides a convenient way to execute scripts.

Basic Usage

Creating a project

To create a project with brig, run brig project create and follow the interactive prompts, supplying project name, GitHub repo details (if not derived from project name), optional secrets and optional advanced configuration.

An example setup might look like the following:

$ brig project create
? Project name brigadecore/empty-testbed
? Full repository name
? Clone URL (
? Add secrets? No
Auto-generated a Shared Secret: "FweBxcwJvcbTTuW5CquyPtHM"
? Configure GitHub Access? No
? Configure advanced options No

To read more about project configuration, see projects.

Running scripts

Brig has built-in help text that you can access easily by adding -h or --help to any command (e.g. brig -h or brig project -h). One of the most frequent usages of Brig is to send a script to the server.

This example program sends a Brigade JavaScript file to a brigade server.

Example usage:

$ brig run my-org/my-project

The above will load the local ./brigade.js to Brigade and execute it within the project my-org/my-project.

By default, Brig requests that the event exec be run. You can override this by supplying a --event=NAME flag. For example, try executing the following script:

const { events } = require("brigadier")

events.on("exec", () => {
  console.log("Hello from brig!")

A more complete example:

$ brig run --file my/brigade.js --namespace my-builds technosophos/myproject

The above looks for ./my/brigade.js and sends it to the Brigade server inside of the Kubernetes my-builds namespace. It executes within the project technosophos/myproject.

The output of the master process is written to STDOUT.

Building Brig

To build Brig, clone the Brigade repository to $GOPATH/src/ and then run make bootstrap brig.

If you have $GOPATH issues, you may need to add the Brigade binary to your path.

How Brig Works

Brig uses your $KUBECONFIG to find out about your Kubernetes cluster. It then authenticates directly to Kubernetes and interacts with Brigade and Kubernetes APIs.

You can’t perform that action at this time.