Importing Projects to CloudBees Jenkins X Distribution
CloudBees Jenkins X Distribution allows users to add existing software project source code to the serverless CI/CD build pipeline. Whether your code is stored in a simple local disk directories or stored in a remote version control system such as GitHub or Subversion.
Users who have existing source code into CloudBees Jenkins X Distribution can use the
jx import command, which leads a user through an interactive command-line interface that configures your source code with build files, helm charts, and pipeline configuration files as well as initializes your GitHub repository.
Change into your application project directory:
Run the import from a command-line:
The application asks for your Git username (such as
The application asks if you wan to initialize your project in Git.
The application asks you what organization to use for managing builds (for example,
The application asks if you want to name your repository (such as
You can now perform builds, commit project code to your newly created Git repository, and CloudBees Jenkins X Distribution will automatically process pull requests and create previews for your applications for testing and validation.
jx import interactive CLI performs the following actions:
Adds your source code into a Git repository
Create a remote git repository on a git service, such as GitHub
Commit your code to the remote Git service
Adds default build files to your project:
Dockerfileto build your application as a docker image
pipeline.yamlto implement the CI / CD pipeline
A helm chart to run your application inside Kubernetes
Registers a webhook (such as
http://hook-jx.184.108.40.206.nip.io/hook) on the remote git repository
Trigger the first pipeline build
If you are importing a repository that does not create a docker image
you can use the
--no-draft command line argument which will not use
Draft to default the Dockerfile and helm chart:
jx import --no-draft
If you already have a an application project in a remote Git repository and want to incorporate CloudBees Jenkins X Distribution for CI/CD pipeline builds, you can use the
$ jx import --url https://github.com/jenkins-x/spring-boot-web-example.git
You can also import projects from a existing github organizations:
$ jx import --github --org acmecorp
You will be prompted for the repositories you want to. Use the cursor keys and space bar to select/deselect the repositories to import.
If you would rather install all the repositories of an organization
$ jx import --github --org acmecorp --all
If you have any questions or feedback on the CloudBees Jenkins X Distribution documentation, send them to email@example.com.
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.
The registered trademark Jenkins® is used pursuant to a sublicense from the Jenkins project and Software in the Public Interest, Inc. Read more at www.cloudbees.com/jenkins/about.
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.