Skip to content

Latest commit

 

History

History
90 lines (61 loc) · 3.2 KB

application-accelerator-git-repo.hbs.md

File metadata and controls

90 lines (61 loc) · 3.2 KB

Create an Application Accelerator Git repository during project creation

This topic describes how to enable and use the GitHub repository creation in the Application Accelerator plug-in.

Overview

The Application Accelerator plug-in uses the Backstage GitHub provider integration and the authentication mechanism to retrieve an access token. Then it can interact with the provider API to create GitHub repositories.

Supported Providers

The supported Git providers are GitHub and GitLab.

Configure

The following steps describe an example configuration that uses GitHub:

  1. Create an OAuth App in GitHub based on the configuration described in this Backstage documentation. GitHub Apps are not supported. For more information about creating an OAuth App in GitHub, see the GitHub documentation.

    These values appear in your app-config.yaml or app-config.local.yaml for local development. For example:

    auth:
      environment: development
      providers:
        github:
          development:
            clientId: GITHUB-CLIENT-ID
            clientSecret: GITHUB-CLIENT-SECRET
  2. Add a GitHub integration in your app-config.yaml configuration. For example:

    app_config:
      integrations:
        github:
          - host: github.com

    For more information, see the Backstage documentation.

(Optional) Deactivate Git repository creation

As of Tanzu Application Platform v1.5, you can deactivate Git repository creation by setting the property customize.features.accelerators.gitRepoCreation to false in tap-values.yaml. This also deactivates Git repository creation in the Application Accelerator extension for VS Code.

See the following example configuration for deactivating Git repository creation:

app_config:
  customize:
    features:
      accelerators:
        gitRepoCreation: false

Create a Project

To create a project:

  1. Go to Tanzu Application Platform GUI, access the Accelerators section, and then select an accelerator. The accelerator form now has a second step named Git repository.

  2. Fill in the accelerator options and click Next.

  3. Select the Create Git repo? check box.

  4. Fill in the Owner, Repository, and Default Branch text boxes.

    Screenshot of the Git repository creation text boxes.

  5. After entering the repository name, a dialog box appears that requests GitHub credentials. Log in and then click Next.

    Dialog box that prompts you to log in to GitHub.

    Screenshot of GitHub log-in credential text boxes.

  6. Click GENERATE ACCELERATOR. A link to the repository location appears.

    Screenshot of the output status, which includes a Download ZIP File button.