Skip to content

Product discovery for instance and group project templates

Project templates are a useful way to get started with projects quickly, skipping the need for creating lots of configuration files and boilerplate. This is particularly useful if for creating new micro-services quickly in a common style. We should allow organizations to manage their own project templates for instances and groups.

Two of the major requests to enhance Project Templates are:

  • add custom templates
  • disable templates

Proposal

  • Admin may enable/disable vendor project templates
  • Admin may select a group that contains the instance projects templates
    • Every project in this group will be available as project template when creating a new project
  • Group master can select a sub-group that contains project templates
  • New GitLab installations come with a default project template group
  • Users when creating a new project will see group templates from every group they have permissions to create a new project in, instance templates and vendor templates

Design

Instance-level Project templates

Admin Area → Project Templates

Built-in Templates

built-in-templates

The term Built-in Templates to refer to vendor templates. These cannot be enabled/disabled as per https://gitlab.com/gitlab-org/gitlab-ce/issues/48043#note_85756587.

Custom Templates

List Empty Undefined
custom-templates custom-templates--empty custom-templates--undefined

The template source group is displayed at the top of the page. The list of templates is paginated like most pages on GitLab. The "Change" button is linked to Admin area → Settings → Custom project templates section. The "Edit" button opens the project's setting page and "Delete" opens the delete project modal dialog.

Changing template source

Admin area → Settings → Custom project templates

set-project-template-source

This uses the "group-picker" component already used in the Admin area.

Group-level project templates

Group Settings → Project Templates

List Empty Undefined
group-settings group-settings--empty group-settings--undefined

Changing the template source inside a group will have similar UI as shown above with a minor change to the copy to indicate sub-groups. This setting can be added to Project settings → General.

Create project from a template

Built-in Custom Group-specific
new-project--built-in new-project--custom new-project--group-specific

The Group-specific tab only appears when creating a project inside a group. The actions that happen upon clicking Use template or Preview remain unchanged.

Links / references

https://gitlab.com/gitlab-org/gitlab-ce/issues/36943

Edited by Jeethu Karthik