stk-legacy create template
Description
The stk-legacy create template
command creates the structure of a Stack Template. This structure contains the files needed to create a Template.
This Template will be used in the stk-legacy create app
, the stk-legacy create env
or both commands.
How does it work?
Run inside a Stack folder, and a sub-folder is generated with the structure to create the Template.
The user must edit the template.yaml
file and set the input parameters for the Template.
Creating Templates in separate repositories
If you want to create a Template separate from a Stack so that it can be used in more than one Stack, you need to run the command in the terminal outside the Stack folder. After that, a folder will be generated with the structure to create the Template.
This folder will be initialized as a Git repository.
The user must edit the template.yaml
file and configure the input parameters of the Template.
Parameters
The command's syntax is: stk-legacy create template [OPTIONS] [NAME]
Check the option available in the command:
Parameter | Description |
---|---|
NAME | Sets the name of the created template. If the name is not given, the repository name from the --remote parameter is set. |
--description | This is the text that describes the Template and its purpose. This description will also be displayed in the stk-legacy list template command to let the user know about the Template. |
--remote | This is a parameter that sets the remote url of the Git repository that will be used as the origin for the Template. If you don't enter the remote, you need to run git add remote to be able to publish the Template in Git. This should only be used in cases where you are using separate repositories for Templates. |
Depreciated Parameters
The parameters below are deprecated.
Parameter | Description |
---|---|
--types | Defines the types of the Template. The Template can be applied to the stk-legacy create app , stk-legacy create env or both commands. If it is applied to the latter, the values for it are: app-template and env-template . To define more than one type of Template, use a comma. |
--deploy | Adds a life cycle section to plugin.yaml , where you can define the commands executed by stk-legacy deploy from the CLI. |
Examples
Check out a sample template below:
Read more
Was this page helpful?