WARNING: Jenkins X version 2.x is unmaintained. Do not use it.
Please refer to the v3 documentation for the latest supported version.
Creating Jenkins X Pipelines from scratch
If you’re starting out with a blank canvas, it’s still a good idea to have a look at the quickstart templates to get inspiration for creating a pipeline with proper syntax and structure.
You can copy the basic structure over from an existing file, or copy from here, but at the very minimum you need to define two pipelines, pullRequest and Release, which will encompass the more detailed stages and steps:
For the pullRequest
pipeline you define the stages and steps that Jenkins X will execute for each pull request, and Release
is the same, just for what should happen to create the final product (whether a k8s app, docker image, static website, etc.)
You can also specify a feature
pipeline, for processing merges to a feature branch. However, note that the Accelerate book recommends against long term feature branches. Instead, consider using trunk based development which is a practice of high performing teams.
Each pipeline will have an agent
defined (usually Kaniko for building docker images) and at least one stage
:
Within each stage you’ll define the steps, which can generally be anything you can call on a command line or execute via a docker container. Configuration for steps lists the various parameters you can use in a step.
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.