Create & Register template from scratch

The main work of setting up Coral is the creation of a template. So using the community to grow and improve templates will be important. If you want to get something quickly you can follow this how-to or if you want to try something with more meat to it, you can fork and register an existing template.

Further, this how-to assumes that you have installed the Coral extension in your account and that you have created a project called CoralTemplates.

Steps

In order to complete this how-to the following will have to be done:

  1. Create a repository in the CoralTemplates project of your account. You can name it what you want, but for this how-to we will use My-Template
  2. Clone the new empty repository to your local machine.
  3. Add a README.md and a folder called namespaces
  4. Next, add a namespaces/Repository.yaml file and add the following yaml to it:

     namespace: Repository
     schema: local://vsts/namespaces/repos/v1
     parameters:
     - id: RepositoryName
       type: string
       display: Repository name
    
     payload:
       repositories:
       - id: repository
         name: '{RepositoryName}'
         stage: Incubation
         defaultBranch: master
    
  5. Now, git add -A followed by git commit -m "Initial template" and git push origin master

Register your newly created template with Coral

Refer to the Register Coral template document and register the My-Template from the CoralTemplates.

Extend the template to your needs

Refer to the Writing Templates document to learn more about template and consult the Reference to learn what resources you can automate the lifecycle of using Coral.