Build Packs

Extending Jenkins X using custom Build Packs

Build Packs & Pod Templates

In Jenkins X a Build Pack allows you to transform source code into a applications which can be deployed on Kubernetes. Build Packs are based on draft, and will automatically add:

  • Dockerfile to turn the code into an immutable docker image for running on kubernetes
  • Jenkinsfile to define the declarative Jenkins pipeline to define the CI/CD steps for the application
  • helm chart in the charts folder to generate the kubernetes resources to run the application on kubernetes
  • a preview chart in the charts/preview folder to define any dependencies for deploying a preview environment on a Pull Request

If you need to add support for different languages or build tools then you will need to create a new Pod Template. A pod template defines the pod used to run the build, and consists of:

  • one or more build containers for running commands inside (e.g. your build tools like mvn or npm along with tools we use for other parts of the pipeline like git, jx, helm, kubectl etc)
  • volumes for persistence
  • environment variables
  • secrets so the pipeline can write to git repositories, docker registries, maven/npm/helm repositories and so forth

Read more about creating build packs and creating pod templates.


Last modified July 13, 2020: release 0.0.1819 (0981d42)