Stuart Hinson bio photo

Stuart Hinson

Rust & Clojure programmer. Open for freelancing.

stuarthinson<at>gmail

LinkedIn Github

The Jenkins Kubernetes plugin is a very cool bit of tech that allows Jenkins to dynamically provision workers from a pool of Docker hosts managed by Kubernetes.

Setting up a worker with lein is straightforward. With the Kubernetes plugin installed, visit your Jenkins configuration page and add a pod template along the lines of

Kubernetes pod template

The Docker image url refers to this Quay.io repository, based on a Dockerfile on Github that adds lein to the base jenkinsci/jnlp-slave image.

Configure your project to use the pod and you’re set.

Jenkins Project config

Note that only lein is supported currently – please submit a PR or open an issue if you’d like to see additional build tools supported!