Group-level project templates
Problem to solve
Especially in larger projects, setting up new GitLab projects from scratch can be a repetitive task. Often, there is a lot of configuration files and boilerplate required.
We already have built-in project templates that ship with GitLab, and instance-level templates we introduce with %11.2. A solution to set up project templates based on actual GitLab projects is needed on a group-level as well.
Further details
Relevant use cases for project templates on group-level:
- Unchanged, default templates only (you have vendored templates only)
- As an admin, add your own templates based on a selected group (have both vendored and custom)
Proposal
- In addition to instance-level custom templates, Group Owners can select a sub-group in the Group settings that contains project templates (and projects to be used as templates only ideally)
- In the Group settings, the custom project group select component will only show subgroups of the top parent group, not (the top parent group) itself.
- When creating a new project, users will see project templates from that group they have permissions to create a new project in, in addition to instance templates and vendor templates
- In the group tab, the group name displayed will be the direct owner of the templates, not the top parent.
- Users can see from which group the project template is sourced from (instance-level and group-level)
- Project descendants from sub-groups of the selected source group are not supported. Template source groups should not have subgroups, ideally.
Designs
User flow 1
Collapsed | Expanded |
---|---|
![]() |
![]() |
- The user selects "New Project" from the "New..." button in the primary navigation bar, without group-context.
- Switches to "Create from template" → "Group" tab
- The UI shows all available groups that have defined custom templates. Groups that have no defined custom templates groups (Group settings) are not shown.
- The user selects a custom template and has to give the project a name, description, etc. In this screen, the "Project path" field is predefined to this groups parent by default and can be changed to any relative subgroup optionally.
- The user can proceed with creating the project.
User flow 2
Templates from the selected group only | Template selected |
---|---|
![]() |
![]() |
- The user clicks on the "New project" button in a group page (or top navigation: "New project" with group contect)
- This presets the "Project path" field in the "New Project" page. The project path field is editable since the user hasn't selected a template yet.
- The user switches to "Create from template" → "Group" tab. Only custom templates from the selected group are shown, if defined. No other group is displayed.
- The user selects a custom template and returns to give the project a name, description, etc. In this screen, the "Project path" field defaults to the parent group but is editable to only allow setting descendant subgroup hierarchies. This means, if the current group has sub-groups, the "Project path" shows a list of all sub-groups only (sub-groups of the selected template's group).
- The user can proceed with creating the project.
Empty state | Group settings → General |
---|---|
![]() |
![]() |
Note: If the "Project path" is the user's username, then the "Group" tab must not appear. It should only appear if the user had selected a different namespace other than their own. It should appear (with a "0" badge) if there aren't any group-level templates.
COPY: Empty state
Custom project templates have not been set up for groups that you are a member of. They are enabled from a group’s settings page. Contact your group’s Owner or Maintainer to setup custom project templates.
Learn more about group-level project templates
COPY: Group Setting
Custom project templates
Select a sub-group as the custom project template source for this group.
What does success look like, and how can we measure that?
- If a template group is defined within group settings, projects inside this group are made available as project templates when creating a new project within this group.