Creating quickstarts for CloudBees Jenkins X Distribution

CloudBees Jenkins X Distribution allows users to create applications using pre-configured templates in their preferred programming language without the need to implement every setting and parameter themselves.

Users can create new applications from a supported list of CloudBees Jenkins X Distribution quickstart applications via the jx create quickstart command.

$ jx create quickstart

The jx create quickstart process

The interactive command-line interface (CLI) guides the user through the creation of a sample application quickstart supported by CloudBees Jenkins X Distribution.

  1. The CLI asks if you want to use your github user (if available) to create your quickstart git repository.

  2. The CLI asks for an organization to use to create the quickstart, which you can choose from the list available.

  3. The CLI asks for a project name for your quickstart application.

  4. The CLI lists a number of quickstarts for you to choose from. For CloudBees Jenkins X Distribution, the following quickstarts are supported:

    • golang-http - A simple HTTP application written in Go.

    • jenkins-cwp-quickstart - A quickstart for creating custom web application archive (WAR) applications.

    • jenkins-quickstart - A quickstart for creating customer Docker images, useful for customizing the list of plugins to install by default in the image.

    • node-http - an HTTP service written with Node.js runtime environment.

    • node-http-watch-pipeline-activity - A Node.js HTTP service that logs the PipelineActivities custom resource definition, which stores pipeline stages for GitOps promotion.

    • spring-boot-http-gradle - A RESTful web service quickstart with a Spring Boot Actuator using Gradle, a build automation tool.

    • spring-boot-rest-prometheus - A quickstart with a Spring Boot REST application designed to report Kubernetes metrics to the Prometheus monitoring tool.

    • spring-boot-rest-prometheus - A quickstart with a Java 11 compatible Spring Boot REST application designed to report Kubernetes metrics to the Prometheus monitoring tool.

    • spring-boot-watch-pipeline-activity - A Spring Boot HTTP service that logs the PipelineActivities custom resource definition, which stores pipeline stages for GitOps promotion.

The quickstart creation process

Once you have created and configured your quickstart, the remaining development environment is automatically created:

  • Creates a new application from the quickstart in a sub directory

  • Adds your source code into a git repository

  • Creates a remote git repository on a service such as GitHub

  • Pushes your code to the remote git service

  • Adds default configuration files for building your application:

    • Dockerfile to incorporate your application into a docker image on Kubernetes.

    • jenkins-x.yml to define the Jenkins X Pipeline and the CI/CD process for your application.

    • A Helm chart to create the resources for running your application inside Kubernetes.

  • Registers a webhook on the remote git repository to your team’s Jenkins environment

  • Adds the git repository to your teams Jenkins environment

  • Triggers the first pipeline

How do quickstarts work?

The source of these quickstarts is maintained in the jenkins-quickstarts GitHub organization.

When you create a quickstart the program finds the Jenkins X build packs to match the right pack for your project using the source code language and picks the most suitable match.

When you use jx create, jx install or jx init the Jenkins X build packs are cloned into your ~/.jx/draft/packs directory.

Depending on your CloudBees Jenkins X Distribution installation type (Serverless Jenkins vs. Static Master Jenkins), you can view all the languages supported via build packs on your machine using the following commands:

For Serverless Jenkins:

ls -al ~/.jx/draft/packs/

For Static Master Jenkins:

ls -al ~/.jx/draft/packs/

Then when you create a quickstart, or use either jx create spring or jx import, the Jenkins X build packs perform various checks and downloads appropriate development files:

  • Find the right language pack from the current supported list.

  • The language pack is then used to create default files if they don’t already exist:

    • Dockerfile to package the application as a docker image

    • jenkins-x.yml to define the Jenkins X Pipeline and the CI/CD process for your application.

    • Helm Charts to deploy the application on Kubernetes and to implement a preview environment to ease validation and code review.

Customizing a quickstart

You can configure at a team level the quickstarts which are presented to you in the jx create quickstart command. These settings are stored in the Environment Custom Resource in Kubernetes.

To add the location of a set of quickstarts you can use the jx create quickstartlocation or the abbreviated jx create qsloc command:

$ jx create quickstartlocation --url --owner my-quickstarts

If you omit the --url argument the command assumes a GitHub repository. Note that both public and private repositories are supported.

You can have your own shared private quickstarts to reuse within your organization.

You can also specify --includes or --excludes patterns to filter the names of the repositories where matches anything and foo matches anything starting with foo. For example, you could include the languages and technologies your organization supports and exclude anything else.

You can then view the current quickstart locations for your team via the jx get quickstartlocations (or jx get qsloc) command:

$ jx get quickstartlocations

You can delete a Git organization using the jx delete quickstartlocation command.

If you have any questions or feedback on the CloudBees Jenkins X Distribution documentation, send them to

Copyright © 2010-2020 CloudBees, Inc.Online version published by CloudBees, Inc. under the Creative Commons Attribution-ShareAlike 4.0 license.CloudBees and CloudBees DevOptics are registered trademarks and CloudBees Core, CloudBees Flow, CloudBees Flow Deploy, CloudBees Flow DevOps Insight, CloudBees Flow DevOps Foresight, CloudBees Flow Release, CloudBees Accelerator, CloudBees Accelerator ElectricInsight, CloudBees Accelerator Electric Make, CloudBees CodeShip, CloudBees Jenkins Enterprise, CloudBees Jenkins Platform, CloudBees Jenkins Operations Center, and DEV@cloud are trademarks of CloudBees, Inc. Most CloudBees products are commonly referred to by their short names — Accelerator, Automation Platform, Flow, Deploy, Foresight, Release, Insight, and eMake — throughout various types of CloudBees product-specific documentation. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Jenkins is a registered trademark of the non-profit Software in the Public Interest organization. Used with permission. See here for more info about the Jenkins project. The registered trademark Jenkins® is used pursuant to a sublicense from the Jenkins project and Software in the Public Interest, Inc. Read more at Apache, Apache Ant, Apache Maven, Ant and Maven are trademarks of The Apache Software Foundation. Used with permission. No endorsement by The Apache Software Foundation is implied by the use of these marks.Other names may be trademarks of their respective owners. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this content, and CloudBees was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this content, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.