Help Center> CodeArts Repo> User Guide> Creating a CodeArts Repo Repository> Creating a Repository Using a Template
Updated on 2023-12-06 GMT+08:00

Creating a Repository Using a Template

You can create a repository using a CodeArts Repo template on the CodeArts Repo console.

Procedure

  1. Access the repository list page.
  2. Click next to New Repository and select Template Repository from the drop-down list. The Select Template page is displayed.
  3. On the Select Template page, enter a keyword for fuzzy search and select a template as required.
  4. Click Next. On the Basic Information page, enter basic repository information.

    Table 1 Parameters for creating a repository using a template

    Parameter

    Mandatory

    Remarks

    Repository Name

    Yes

    The name must start with a letter, digit, or underscore (_) and can contain periods (.) and hyphens (-), but cannot end with .git, .atom, or period (.). Max. 200 characters.

    Project

    Yes

    • A repository must be associated with a project.
    • If the account does not have a project, click Create Project in the drop-down list box to create a Scrum or an IPD-Self-Operated Software/Cloud Service project.
    NOTE:

    If you create a repository in a project, the project is selected for Project by default, and the Project parameter is hidden on the repository creation page.

    Description

    No

    Enter a description for your repository. The description can contain a maximum of 2000 characters.

    Permissions

    No

    • Make all project developers automatic repository members

      If you select this option, the project developer is automatically added as a repository member. By default, the project manager is a repository member.

    Visibility

    Yes

    The options are as follows:

    • Private

      The repository is visible only to repository members. Repository members can access the repository or commit code.

    • Public

      The repository is open and read-only to all guests, but is not displayed in their repository list or search results. You can select an open-source license as the remarks.

  5. Click OK to create the repository.

When you create a repository by template, the repository type of the selected template will be automatically configured for the repository.

The repository created using the template contains the repository file structure preset in the template.

Automatically Creating a Pipeline

A pipeline can be automatically created when a repository is created using a template. Note that the host used in CodeArts Deploy must be changed to the actual environment so that the pipeline can be successfully executed.

  1. On CodeArts Repo, click next to New Repository and select Template Repository.
  2. On the Select Template page, set Automated Pipeline Creation to Yes in the navigation pane to display templates that can be used to automatically create a pipeline.

  3. Select a template as required, click Next, enter basic repository information, and click OK.
  4. After the repository is created, you can view the pipeline that is automatically created on the pipeline list page displayed.