Importing projects

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.

  1. Change into your application project directory:

    cd acmeapp/
  2. Run the import from a command-line:

    jx import
  3. The application asks for your Git username (such as acmeuser).

  4. The application asks if you wan to initialize your project in Git.

  5. The application asks you what organization to use for managing builds (for example, acmecorp)

  6. The application asks if you want to name your repository (such as acme-springapp1)

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.

Running the 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:

    • A Dockerfile to build your application as a docker image

    • A pipeline.yaml to implement the CI / CD pipeline

    • A helm chart to run your application inside Kubernetes

  • Registers a webhook (such as on the remote git repository

  • Trigger the first pipeline build

Avoiding docker + helm

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

Importing via URL

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 --url option:

$ jx import --url

Importing GitHub projects

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