Markus Heiliger 2022-02-10 22:08:57 +01:00
Родитель 19dfdf7530 a636728760
Коммит e8b749883a
12 изменённых файлов: 366 добавлений и 23 удалений

6
.vscode/settings.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,6 @@
{
"yaml.schemas": {
"project.json": "project.yaml",
"component.json": "component.yaml"
}
}

Просмотреть файл

@ -7,8 +7,10 @@ type: Environment
# set the component description # set the component description
description: ./readme.md description: ./readme.md
# Set the component isolation level configuration:
isolation: ResourceGroup
# Set the component isolation level
isolation: ResourceGroup
parameters: parameters:

221
component.json Normal file
Просмотреть файл

@ -0,0 +1,221 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TeamCloud Components",
"description": "Schema for TeamCloud Component definitions",
"type": "object",
"additionalProperties": false,
"required": [
"name",
"type"
],
"properties": {
"name": {
"type": "string",
"description": "The display name of the component"
},
"type": {
"oneOf": [
{
"const": "Environment",
"description": "Cloud environment"
},
{
"const": "Repository",
"description": "Git repository"
}
]
},
"description": {
"type": "string",
"description": "A description string or reletive url to a markdown file",
"examples": [
"./readme.md"
]
},
"configuration": {
"description": "Configuration for the component",
"oneOf": [
{
"$ref": "#/definitions/EnvironmentConfiguration"
},
{
"$ref": "#/definitions/RepositoryConfiguration"
}
]
},
"parameters": {
"type": "array",
"description": "Input paramaters to use when creating the component",
"items": {
"$ref": "#/definitions/Parameter"
}
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/definitions/Task"
}
},
"taskRunner": {
"$ref": "#/definitions/TaskRunner"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
}
},
"definitions": {
"EnvironmentConfiguration": {
"type": "object",
"description": "The Environment Component configuration",
"required": [
"isolation"
],
"properties": {
"isolation": {
"enum": [
"ResourceGroup",
"Subscription"
]
}
}
},
"RepositoryConfiguration": {
"type": "object",
"description": "The Repository Component configuration",
"required": [
"templateRepository"
],
"properties": {
"templateRepository": {
"type": "string",
"description": "Template repository to use when creating a new repo"
}
}
},
"Parameter": {
"type": "object",
"required": [
"id",
"name",
"type"
],
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the parameter"
},
"name": {
"type": "string",
"description": "Display name of the parameter"
},
"description": {
"type": "string",
"description": "Description of the parameter"
},
"default": true,
"type": {
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
],
"default": "string",
"description": "A string of one of the basic JSON types (number, integer, null, array, object, boolean, string)"
},
"readOnly": {
"type": "boolean",
"description": "Whether or not this parameter is read-only. If true, default should have a value"
},
"required": {
"type": "boolean",
"description": "Whether or not this parameter is required"
},
"allowed": {
"type": "array",
"items": true,
"minItems": 1,
"uniqueItems": true,
"description": "An array of allowed values"
}
}
},
"Task": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the task"
},
"name": {
"type": "string",
"description": "Display name of the task"
},
"description": {
"type": "string",
"description": "Description of the task"
}
}
},
"TaskRunner": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"examples": [
"teamcloud/tcrunner-arm",
"teamcloud/tcrunner-terraform"
]
}
}
},
"Permission": {
"type": "object",
"required": [
"role",
"permission"
],
"properties": {
"role": {
"enum": [
"none",
"member",
"admin",
"owner",
"adapter"
]
},
"permission": {
"oneOf": [
{
"type": "string",
"examples": [
"Contributor",
"Reader"
]
},
{
"type": "array",
"items": {
"type": "string",
"examples": [
"Contributor",
"Reader"
]
}
}
]
}
}
}
}
}

Просмотреть файл

@ -7,8 +7,10 @@ type: Environment
# set the component description # set the component description
description: ./readme.md description: ./readme.md
# Set the component isolation level configuration:
isolation: ResourceGroup
# Set the component isolation level
isolation: ResourceGroup
parameters: parameters:

Просмотреть файл

@ -0,0 +1,21 @@
# set the display name of the component
name: Microservice C#
# Set the component type
type: Repository
# set the component description
description: ./readme.md
configuration:
parameters:
tasks:
permissions:
- role: owner
permission: Contributor
provider: teamcloud/tcrunner-arm

Просмотреть файл

@ -0,0 +1,3 @@
# Microservice
Create a new repository with a C# microservice sample project

Просмотреть файл

@ -1,12 +1,8 @@
{ {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0", "contentVersion": "1.0.0.0",
"parameters": { "parameters": { },
}, "variables": { },
"variables": { "resources": [ ],
}, "outputs": { }
"resources": [ }
],
"outputs": {
}
}

Просмотреть файл

@ -7,8 +7,11 @@ type: Environment
# set the component description # set the component description
description: ./readme.md description: ./readme.md
# Set the component isolation level configuration:
isolation: ResourceGroup
# Set the component isolation level
isolation: ResourceGroup
tasks: tasks:

83
project.json Normal file
Просмотреть файл

@ -0,0 +1,83 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TeamCloud Project",
"description": "Schema for TeamCloud Project definitions",
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The display name of the project"
},
"description": {
"type": "string",
"description": "A description string or reletive url to a markdown file",
"examples": [
"./README.md"
]
},
"parameters": {
"type": "array",
"description": "Input paramaters to use when creating the project",
"items": {
"$ref": "#/definitions/Parameter"
}
}
},
"definitions": {
"Parameter": {
"type": "object",
"required": [
"id",
"name",
"type"
],
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the parameter"
},
"name": {
"type": "string",
"description": "Display name of the parameter"
},
"description": {
"type": "string",
"description": "Description of the parameter"
},
"default": true,
"type": {
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
],
"default": "string",
"description": "A string of one of the basic JSON types (number, integer, null, array, object, boolean, string)"
},
"readOnly": {
"type": "boolean",
"description": "Whether or not this parameter is read-only. If true, default should have a value"
},
"required": {
"type": "boolean",
"description": "Whether or not this parameter is required"
},
"allowed": {
"type": "array",
"items": true,
"minItems": 1,
"uniqueItems": true,
"description": "An array of allowed values"
}
}
}
}
}

Просмотреть файл

@ -7,8 +7,10 @@ type: Environment
# set the component description # set the component description
description: ./readme.md description: ./readme.md
# Set the component isolation level configuration:
isolation: ResourceGroup
# Set the component isolation level
isolation: ResourceGroup
parameters: parameters:

Просмотреть файл

@ -7,8 +7,10 @@ type: Environment
# set the component description # set the component description
description: ./readme.md description: ./readme.md
# Set the component isolation level configuration:
isolation: ResourceGroup
# Set the component isolation level
isolation: ResourceGroup
parameters: parameters:

Просмотреть файл

@ -7,8 +7,10 @@ type: Environment
# set the component description # set the component description
description: ./readme.md description: ./readme.md
# Set the component isolation level configuration:
isolation: ResourceGroup
# Set the component isolation level
isolation: ResourceGroup
parameters: parameters: