From d4eaa2121d811b9eee583a7290a8bdf9257a3f96 Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Thu, 29 Jun 2017 22:16:28 +0200 Subject: [PATCH] exercise environment config --- Exercise-Configuration.md | 179 ++++++++++++++++++++++++-------------- 1 file changed, 114 insertions(+), 65 deletions(-) diff --git a/Exercise-Configuration.md b/Exercise-Configuration.md index 23937ca..71fc1ea 100644 --- a/Exercise-Configuration.md +++ b/Exercise-Configuration.md @@ -8,70 +8,6 @@ HiLC is divided in several parts which takes care of different things. There are Represents basic exercise configuration which connects all things together. For some reasons there two formats of this configuration, one which is saved in the database and the other one which is sent back to web application. Both formats are described bellow. -### Backend Format - -Stored in yaml. - -Mandatory items are bold, optional italic, description of items follows: - -* **environments** - ... -* **tests** - ... - * **${test identification}** - ... - * **pipelines** - ... - * **${pipeline identification}** - ... - * **variables** - ... - * **${variable identification}** - ... - * **type** - ... - * **value** - ... - * **environments** - ... - * **${environment identification}** - ... - * **pipelines** - ... - * **${pipeline identification}** - ... - * **variables** - ... - * **${variable identification}** - ... - * **type** - ... - * **value** - ... - -Example: - -``` -environments: - - java8 - - cpp11 -tests: - "Test 1": - pipelines: - "pipeline1": - variables: - varA: - type: string - value: valA - environments: - java8: - pipelines: - "pipelineJava": - variables: - varJava: - type: string - value: valJava - cpp11: [] - "Test 2": - pipelines: - "pipeline2": - variables: - varB: - type: file - value: valB - environments: - cpp11: - pipelines: - "pipeline2": - variables: - varCpp: - type: file - value: valCpp -``` - ### Frontend Format Returned as JSON. @@ -201,6 +137,70 @@ Example: ] ``` +### Backend Format + +Stored in yaml. + +Mandatory items are bold, optional italic, description of items follows: + +* **environments** - ... +* **tests** - ... + * **${test identification}** - ... + * **pipelines** - ... + * **${pipeline identification}** - ... + * **variables** - ... + * **${variable identification}** - ... + * **type** - ... + * **value** - ... + * **environments** - ... + * **${environment identification}** - ... + * **pipelines** - ... + * **${pipeline identification}** - ... + * **variables** - ... + * **${variable identification}** - ... + * **type** - ... + * **value** - ... + +Example: + +``` +environments: + - java8 + - cpp11 +tests: + "Test 1": + pipelines: + "pipeline1": + variables: + varA: + type: string + value: valA + environments: + java8: + pipelines: + "pipelineJava": + variables: + varJava: + type: string + value: valJava + cpp11: [] + "Test 2": + pipelines: + "pipeline2": + variables: + varB: + type: file + value: valB + environments: + cpp11: + pipelines: + "pipeline2": + variables: + varCpp: + type: file + value: valCpp +``` + ## Pipeline Mandatory items are bold, optional italic, description of items follows: @@ -233,7 +233,56 @@ box-id-2: memory: 60 ``` -## RuntimeConfig +## ExerciseEnvironmentConfig + +### Frontend Format + +Mandatory items are bold, optional italic, description of items follows: + +* ... + +Example: + +``` +[ + { + "runtimeEnvironmentId":"CRuntime", + "variablesTable":[ + { + "varA":{ + "type":"string", + "value":"valA" + } + }, + { + "varB":{ + "type":"file", + "value":"valB" + } + } + ] + }, + { + "runtimeEnvironmentId":"JavaRuntime", + "variablesTable":[ + { + "varA":{ + "type":"file", + "value":"javaA" + } + }, + { + "varB":{ + "type":"string", + "value":"javaB" + } + } + ] + } +] +``` + +### Backend Format Mandatory items are bold, optional italic, description of items follows: