debian-mirror-gitlab/doc/user/group/custom_project_templates.md
2021-09-30 23:02:18 +05:30

3.1 KiB

type stage group info
reference Manage Import To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments

Custom group-level project templates (PREMIUM)

Introduced in GitLab Premium 11.6.

Group owners can set a subgroup to be the source of project templates that are selectable when a new project is created in the group. These templates can be selected when you go to New project > Create from template in the group and select the Group tab.

Every project in the subgroup, but not nested subgroups, can be selected by members of the group when a new project is created.

Repository and database information that is copied over to each new project is identical to the data exported with the GitLab Project Import/Export.

To set custom project templates at the instance level, see Custom instance-level project templates.

Set up group-level project templates

To set up custom project templates in a group, add the subgroup that contains the project templates to the group settings:

  1. In the group, create a subgroup.
  2. Add projects to the new subgroup as your templates.
  3. In the left menu for the group, go to Settings > General.
  4. Expand Custom project templates and select the subgroup.

If all enabled project features (except for GitLab Pages) are set to Everyone With Access, then every project template in the subgroup is available to every member of the group.

Any projects added to the subgroup later can be selected the next time a group member creates a new project.

Example structure

Here's a sample group/project structure for project templates, for a hypothetical Acme Co:

# GitLab instance and group
gitlab.com/acmeco/
    # Subgroups
    internal
    tools
    # Subgroup for handling project templates
    websites
        templates
            # Project templates
            client-site-django
            client-site-gatsby
            client-site-hTML

        # Other projects
        client-site-a
        client-site-b
        client-site-c
        ...