Jenkins X

Jenkins X is an Open Source system that provides continuous integration (CI), continuous delivery (CD) and automated testing tools designed for cloud-native applications in a Kubernetes environment. Jenkins X contributes pipeline automation, built-in Git operations (GitOps) and preview environments in order to help teams collaborate and speed up their software delivery process.

Jenkins X does not aim to replace Jenkins; in fact, Jenkins X uses Jenkins as its core CI/CD engine. The Jenkins pipeline already automates CI, however, it assembles continuous delivery with custom scripts, manual configuration and isolated release operations. To achieve proper orchestration of resources and processes in the cloud with containers, DevOps teams must determine how to get the right plugins, configuration and code to work together. This requires skills in both Jenkins and Kubernetes and ultimately slows down the application delivery process. Jenkins X is the solution; it is designed to address this problem by specifically automating CI/CD for the cloud. It adds what Jenkins is missing: complete support for CD and management of the promotion of projects to preview, staging and production environments in Kubernetes. Developers using Jenkins X do not need to have Kubernetes or Jenkins expertise.

Jenkins X supports all major cloud platforms, including Google, Amazon, Microsoft Azure, IBM Cloud and Red Hat OpenShift.

How Jenkins X works

Developers do not interact directly with Jenkins in Jenkins X. In fact, they do not even need to directly install Jenkins in order to use Jenkins X. Jenkins operates behind the scenes, running the pipelines for CI/CD of the respective repositories and orchestrating actions with Kubernetes.

Jenkins X is an opinionated system that defines various features of the software development lifecycle as well as makes decisions for the developer. It provides automatic feedback on commits, issues and pull notifications. However, Jenkins is also a flexible system that allows users to modify it to best fit their individual needs.

At the start of a new project, Jenkins X creates the necessary structure and files for the developers. If a Kubernetes cluster is needed with all the appropriate tools installed and configured, then Jenkins X will take care of this set up as well. A single jx command can also be used to create Git repositories, set webhooks and create CD pipelines.

The Jenkins X system possesses several quick start tools that help developers begin work in minutes, such as a language pack that writes the sample app in the language of choice, containerizes it and commits the Dockerfile, Jenkinsfile, Helm charts and Skaffol workflow to an integrated Git repository.

Each team using Jenkins X receives a set of environments. Jenkins X then automates the management of these environments as well as the promotion of new application builds between the environments and GitOps.

Jenkins X also automatically creates preview environments for pull notifications, enabling developers to receive fast feedback before their changes are merged with the master appplication.

Features of Jenkins X

  • Automated CI/CD pipelines - These pipelines apply the best CI/CD features. They create a Jenkinsfile that defines CI/CD pipelines through declarative pipeline-as-code, a Dockerfile that packages the application as an unchangeable container image if the application generates images and a Helm chart that deploys and runs the application in the Kubernetes environment. The automoated CI/CD pipelines also confirm code is placed in a Git repository -- like GitHub -- and trigger the first release pipeline to promote the application to the staging environment.

  • Environment promotion through GitOps - The default environments in Jenkins X are staging and production, but development teams can create however many environments they want with whatever names they choose. GitOps then manages each environment and performs promotion. The default system uses automatic promotion in staging environments, allowing all merges to the master to be automatically promoted to staging. The production environment then uses manual promotion which allows developers to choose when they want to promote.

  • Preview environments - Preview environments allow developers to test their application before it is merged. Preview environments are usually created automatically in the pull notification pipeline whenever a pull notification is introduced, but they can also be created and performed manually.

  • Extension - Extensions to the Jenkins X system can be created. An extension is code that runs at specific times in the CI/CD pipeline. An extension can run code when an application is installed or uninstalled as well as before or after each pipeline.

  • Serverless Jenkins - Jenkins X has the capability to run only when it is needed, instead of continually consuming CPU and memory resources by running on the Jenkins web application.

Advantages of Jenkins X

Jenkins X offers developers an easier setup process with automatic installation, configuration and upgrades of external tools, build packs for various types of projects and assistance in getting started quickly with the single line jx command.

Jenkins X also allows every team to work in isolation, enabling them to run their own instance of Jenkins X either in a cluster or on their own. In a shared cluster, each team can share resources while remaining in charge of their individual pipelines, configurations and flows. Separate clusters provide teams with their own resources and allow them to work in an environment that is not impacted by the work of other teams. Furthermore, the jx create devpod command can be used to provide each developer with a personal sandbox within the Jenkins X cluster, promoting further isolation and unobstructed workspace.

Commands can accelerate most tasks in Jenkins X, providing the system with increased overall speed as well as easy integration with cloud or storage class memory (SCM). Jenkins X also enables development without the obstacle of shipping logistics slowing actions down.

Finally, the use of GitOps allows for faster recovery by creating a universal source that holds all builds and every comment available for each pull notification. This single source enables developers to find the right context and traceable information in order to more quickly resolve outages.


This was last updated in August 2019

Continue Reading About Jenkins X

Dig Deeper on Application development and design

Software Quality
Cloud Computing