Categories

In my quest for the ultimate tool for continuous integration and continuous delivery pipelines on a Kubernetes cluster, I’ve previously looked at well-known options such as Gitlab and Jenkins. These tools may have integrations with Kubernetes, but are usually anything but lightweight. If you just want to get your code from point A (git) to point B (a production Kubernetes cluster), you may be interested in a new tool named “Brigade“.

Brigade was introduced by Microsoft late last year. It’s an event-driven scripting tool for Kubernetes which aims to make CI/CD pipelines on a cluster easier. Contrary to many other tools, it tells developers to “leave your YAML at home”, instead opting for JavaScript.

In this blog, I’d like to walk you through the steps of setting up your first basic CI/CD pipeline with Brigade.

Let’s say you’ve got a CI/CD pipeline and you would like to run builds in containers. You could just configure Docker on one of your machines and point your builds there, but why not use something a bit more scalable? Enter Kubernetes, a leading container orchestration platform, which luckily offers several options for using its self-contained pods as on-demand CI builders. Things like sharing sources between containers and networking will be handled for you, so all you’ll have to worry about is specifying the desired image.

In this blog, I’ll be exploring two of those options in commonly used CI tools, namely Gitlab and Jenkins, and will explain how to configure the Gitlab-runner or Jenkins Kubernetes plugin to run on-demand CI builders on a Kubernetes (or “K8s”) cluster.