Quickstart: Connect to source code management

2 minute read

To get started with the CloudBees platform, create a new GitHub repository from a CloudBees template that includes a sample app written in Go. Set up an integration connecting this repository to the platform, so you can use it in subsequent quickstarts.

Prerequisites

You must have a valid GitHub account to proceed with this quickstart.

Create a repository

Create a new GitHub repository in your GitHub account, from a CloudBees sample app repository template.

To create a Go sample app repository:

  1. Go to the CloudBees sample Go app repository, and select Use this template.

  2. To copy the template repository, select the Create a new repository option.

    Copy the CloudBees template repository
    Figure 1. Create a new repository coding for a sample Go app
  3. Do not select Include all branches.

  4. Select your GitHub ID from the options.

  5. Enter a Repository name.

  6. (Optional) Enter a Description.

  7. Select either Public or Private, according to your requirements.

  8. Select Create repository.

Your new repository is created in your GitHub account, from the CloudBees sample Go app template repository. You are now ready to create an integration with this repository.

Create an integration

Connect CloudBees platform to your new repository by creating a GitHub App integration. This integration allows CloudBees platform to access your repository and use it in components and workflows.

To create a CloudBees platform integration:

  1. Select an organization, and then select Configurations  Integrations.

  2. Select Create integration.

    Create an integration
    Figure 2. Create a new integration.
  3. Select Source code management.

  4. Select GitHub App.

  5. Enter a Name for the GitHub App.

  6. (Optional) Enter a Description.

  7. Select Install GitHub App. This action redirects you to GitHub.

  8. Select the GitHub account or GitHub organization where you created the sample Go app repository.

    Create environment
    Figure 3. GitHub App installation with available GitHub organization highlighted
  9. Select All repositories or Only select repositories, and select the name of your sample Go app repository from the options.

  10. Select Install & Authorize.

The integration is connected and can now be used when creating components and workflows that reference this repository.

GitHub App integrations created for source code access may not appear as standalone entries in Configurations > Integrations. These integrations are used implicitly by CloudBees platform and applied automatically when you create components and workflows that reference the repository.

If you previously created and authorized a GitHub App, the platform reuses the existing app and may skip the Install and Authorize step.

You are now ready to create a new component and set up a workflow using the connected repository.