User-defined new project templates
Description
Gitlab 9.5 introduces project templates and offers 3 built-in ones out of the box. I think it is a great idea that can help new users as well as big teams. This proposal is a further extension of the project template idea.
Specifically I would like to suggest allowing users to define custom project templates.
Use cases
There are two situations relevant to my personal use case (running a Gitlab CE instance within a university environment):
- Research project template:
Most likely this is specific to a research group, and might require custom CI settings. - Course project template:
I believe Gitlab can be a great educational tool for programming or data science courses since it is very easy to automate, audit, manage permissions, etc. Here I can imagine the template would be even more specific and might include prepared scripts for acquiring data, examples, pre-set tests, etc.
In a company setting a custom template could include a more specific CI setting, as opposed to merely running language-specific tests. It could also be made more flexible to accommodate a non-standard project layout that follows the company guidelines.
Proposal
While there are several options, I believe the most flexible one that also make most sense from the UI perspective is to allow to use any existing project from the same gitlab instance as a template. Importantly, this isn't the same as forking since every namespace may only contain one fork of a given project, and this establishes a relation between the two projects, while the templates don't need to be related to the original ones.
Additionally certain much more situation-specific settings may be copied over from the template. Consider if the access permissions are copied. Then the resulting project will automatically be assigned a correct visibility status, while in my experience projects that should be private are often started as internal. Also if a template is shared with a group (a step also frequently forgotten by the users), the copy may be as well. Same arguments apply to runner configuration, and I imagine many other project-specific settings.
As far as the ways to enable this in the UI go, I can imagine several possibilities:
- Modify the behavior of fork button, to let the user decide whether to fork or use as a template.
- Replace the fork button in archived projects to make a new templated project (really unsure about this one)
- Add a new option to
/projects/new
(has a disadvantage that the form is already quite dense).