Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 55k
    • Issues 55k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1.6k
    • Merge requests 1.6k
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #6861
Closed
Open
Issue created Jun 18, 2018 by Andreas Kämmerle@akaemmerleContributor

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
create-from-template--group-1--collapsed create-from-template--group-1--expanded
  1. The user selects "New Project" from the "New..." button in the primary navigation bar, without group-context.
  2. Switches to "Create from template" → "Group" tab
  3. The UI shows all available groups that have defined custom templates. Groups that have no defined custom templates groups (Group settings) are not shown.
  4. 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.
  5. The user can proceed with creating the project.

User flow 2

Templates from the selected group only Template selected
create-from-template--group-1--expanded_copy create-from-template--template-set
  1. The user clicks on the "New project" button in a group page (or top navigation: "New project" with group contect)
  2. 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.
  3. 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.
  4. 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).
  5. The user can proceed with creating the project.
Empty state Group settings → General
new-project--custom--empty group-settings

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.
Edited Sep 17, 2018 by Andreas Kämmerle
Assignee
Assign to
Time tracking