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 kubernetesJenkinsfile
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
ornpm
along with tools we use for other parts of the pipeline likegit
,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.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified June 10, 2020: chore: better structure of extending Jenkins X section (a47334a61e)