Jay Taylor's notes

back to listing index

Azure/brigade

[web search]
Original source (github.com)
Tags: javascript golang go kubernetes bridade pipelines github.com
Clipped on: 2018-07-23
Event-based Scripting for Kubernetes. http://brigade.sh/
Go TypeScript JavaScript Shell Makefile Smarty
brig Merge pull request #551 from radu-matei/kashti-dashboard 5 days ago
brigade-api feat(api) port api tests to go-restful 12 days ago
brigade-controller fix(controller): add an accepted label to builds after sync 2 months ago
brigade-cr-gateway fix(storage): Improve storage layer for projects (#507) a month ago
brigade-github-gateway chore(Makefile): refactor lint and format (#374) 4 months ago
brigade-vacuum fix(*): fix style issues 6 months ago
brigade-worker updated fallback script path to look for brigade.js instead of direct… 17 days ago
charts Make service account creation conditional (#544) 7 days ago
docs Merge pull request #539 from Azure/custom-deps-docs 13 days ago
git-sidecar fix(git-sidecar): when commit-ref is missing, use commit-id 3 months ago
pkg feat(api) port api tests to go-restful 12 days ago
scripts ref(*): remove label for commit_id 5 months ago
tests ref(tests): remove generator from functional tests (#377) 4 months ago
.eslintrc.js feat(js): make `project` a global JS var (#75) a year ago
.gitignore chore(*): git ignore swp files 27 days ago
Gopkg.lock feat(brig): Add AGE to brig build list (#545) 6 days ago
Gopkg.toml feat(api) port api tests to go-restful 12 days ago
LICENSE rename LICENSE.txt to LICENSE 9 months ago
Makefile feat(brig): add brig container (#409) 4 months ago
README.md docs(README) Point all docs links to azure.github.io/brigade a month ago
brigade.js fix(brigade.js): shorten the error message (#556#556, fix(brigade.js): shorten the error message) 6 days ago
code-of-conduct.md add link to Microsoft's Code of Conduct 2 months ago
draft.toml chore(*): brigade rename (#225) 10 months ago
gometalinter.json chore(Makefile): refactor lint and format (#374) 4 months ago

README.md

Brigade: Event-based Scripting for Kubernetes

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.

Quickstart

  1. Install Brigade
  2. Create a Brigade project
  3. Write a Brigade script
  4. Execute the 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.

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

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

You can download the latest version of the Brig client from the releases page

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.

Contributing

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.

Press h to open a hovercard with more details.