Templates for Makefiles and README
Problem to solve
Group and instance template project currently support templates for the following files:
- Dockerfile
- .gitignore
- gitlab-ci.yml
- LICENSE
We would love to have the ability to add templates for Makefile and README
README because, like for this ticket (or ticket templates in general), we can pre-fill with sections we expect the developer to add to their project documentation.
Makefile because we have a pretty standard suite of project and deployment types that generally require a pretty common makefile for all projects in a single given suite:
- Java project library (releases a jar file to Nexus)
- Java service (creates a docker file and deploys and runs it)
- React front end (makes a zip file of browser assets that is pushed into cloudfront or similar)
- Node service (creates a docker file and deploys and runs it)
We do this with Makefiles (which import a per-project customisation) and .gitlab-ci.yml (which is almost an exactly standard build process, reflecting our branching strategy, for any type of project (except for the selection of a correctly configured build runner), and generally relies on the Makefile to differentiate tools e.g. npm or maven).
Intended users
Developerw
Further details
In general probably this should be a feature so that customers can configure any type of template file. For each type of file template, only four pieces of information are needed:
- Type of file (e.g. Dockerfile, Makefile, LICENSE, Maven pom)
- Directory containing templates (e.g. Dockerfile, Makefile, gitignore, README, pom)
- Template file extension (.dockerfile, .makefile, .txt, .gitignore, .readme, .xml)
- Target file name (Dockerfile, Makefile, .gitlab-ci.yml, README.md, pom.xml)
Addition / administration of new generic template types could be restricted to instance level administrators, but adding templates files to a template project could left to any suitable user with access, e.g. group owners.
Proposal
Users would select templates based on existing flow for templates. New template types configured by administrators appear in the drop down. Custom templates available to the user then appear when selected as per current functionality.
Permissions and Security
EE level feature as as the base item is EE I think?
Administrators at the instance level to configure new template types available.
Group owners able them to add these templates to configured template project.
Documentation
Documentation for administrators to add custom template types is necessary. Existing documentation updated elsewhere.
If you only add a few new fixed template types (e.g Makefile), then only existing documentation needs to be updated with the new template types available.
Testing
tests are good.
What does success look like, and how can we measure that?
Well, people using it would be the best measure of success. Look at how many custom types administrators have defined in their instances and how many people are using them.