Project template
When creating a project, we can include a template to pre-populate it with models and jobs. Project template can be defined with a yaml file.
By convention, the name of the yaml file can be used as the value of --template option when creating a project. For example, if you create a project with this command: project create --name MyProject --template sample, the system will try to find sample.yaml file in [base]\Templates\ folder.
The following things can be put as the content of the yaml file:
1
client: [client of the project]
2
models:
3
- name: [name of the model]
4
label: [label of the model]
5
properties:
6
- name: [name of the model property]
7
label: [label of the model property]
8
data-type: [string | int | short | float | double | decimal | bool | datetime | byte | guid | dbgeography]
9
control-type: [input-text | input-number | input-file | textarea | checkbox | checkboxlist | select | radio | calendar | image]
10
is-required: [true | false]
11
jobs:
12
- name: [name of the job]
13
tasks:
14
- name: [name of the job task]
15
type: [Build | Clone | Deploy | DeployDb | Generate | Merge | Push | PublishArtifact | Test]
16
provider: [name of the task provider]
17
configs:
18
[any additional configs which are required by the provider, e.g:]
19
GitHubExternalService: [name of the GitHub external service]
20
AzureExternalService: [name of the Azure external service]
21
CreatePullRequest: [true | false]
Copied!
The yaml file can also be generated by exporting the existing project.
Last modified 2yr ago
Copy link