-
Notifications
You must be signed in to change notification settings - Fork 0
/
broccoli_schema.json
187 lines (187 loc) · 6.18 KB
/
broccoli_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://portal.webgap.eu/alpaca/schemas/broccoli.json",
"title": "Broccoli schema definition",
"description": "This document describes how to interact with broccoli Job Executor system",
"additionalProperties": false,
"type": "object",
"definitions": {
"none": {
"title": "File",
"description": "Search in",
"type": "object",
"additionalProperties": false,
"properties": {}
},
"filter": {
"title": "Line",
"description": "Search in",
"type": "object",
"additionalProperties": false,
"properties": {
"filterFile": {
"title": "File to read",
"description": "Please specify the file you want to filter or a regex",
"type": "string",
"minLength": 1
},
"pattern": {
"title": "Matching Regex",
"description": "This regex should match exactly what you want to extract from the file(s)",
"type": "string",
"minLength": 1
},
"writeFile": {
"title": "File to write",
"description": "Please specify the file you want to write the matching results or a regex",
"type": "string",
"minLength": 1
},
"placeholder": {
"title": "Placeholder",
"description": "The placeholder in the file(s) you want to be replaced with the matched results",
"type": "string",
"minLength": 1
},
"copy": {
"title": "Copy file for each Match?",
"description": "One copy of the file per regex match?",
"type": "boolean"
}
}
},
"task": {
"title": "Describes a Task",
"description": "A Task is a simple process holding a name, a description, steps to run a command and following Sub Tasks (Guidance Tasks)",
"additionalProperties": false,
"type": "object",
"properties": {
"taskName": {
"title": "Task Name",
"description": "A Name for the Task",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"taskDescription": {
"title": "Task Description",
"description": "Description of the Task",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"workingDir": {
"title": "Working directory",
"description": "The Working directory where the task will run. Can be a relative path to the Job Working Directory",
"type": "string"
},
"wait": {
"title": "Wait for other Tasks, at same level, to complete",
"description": "Set it to true if this Task should wait for others to complete before moving on to children",
"type": "boolean"
},
"failTolerant": {
"title": "Do not exit if command fails.",
"description": "Set it to true if children can be processed even if one of the commands fails",
"type": "boolean"
},
"preparation": {
"title": "What do you want to do?",
"description": "What to do to before run this task. It can be a simple command, read a file line by line or search for files to process",
"type": "object",
"oneOf": [{
"title": "Just run commands",
"description": "",
"$ref": "#/definitions/none"
}, {
"title": "Filter",
"description": "Please use '$file' placeholder in the commands section if you want to use the matched files or $line if you want the matched content",
"$ref": "#/definitions/filter"
}]
},
"commands": {
"title": "Commands",
"description": "The commands, or tools, you want to execute",
"type": "array",
"minItems": 1,
"uniqueItems": false,
"additionalItems": false,
"items": {
"description": "The command to execute",
"title": "Command",
"type": "string",
"minLength": 1
}
},
"children": {
"title": "Tasks",
"description": "Defines the Tasks to execute after the current Task finishes",
"type": "array",
"additionalItems": false,
"items": {
"title": "Guidance Task",
"description": "A Task is a simple process holding a name, a description, steps to run a command and following Tasks",
"$ref": "#/definitions/task",
"additionalProperties": false
}
}
},
"required": [
"taskName",
"commands"
]
}
},
"properties": {
"jobName": {
"title": "Job Name",
"description": "The Job Name is used to identify the Job running",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"jobDescription": {
"title": "Job Description",
"description": "The Job Description is used to provide more details on the Job to perform",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"workingDir": {
"title": "Working directory",
"description": "The root Working directory where the processor will run. All paths will be relative from here",
"type": "string",
"minLength": 1
},
"timeout": {
"title": "Timeout",
"description": "The Timeout in seconds for the executor to trigger the kill of all processes running for this Job",
"type": "integer",
"multipleOf": 1,
"maximum": 86400,
"minimum": 1,
"exclusiveMaximum": false,
"exclusiveMinimum": false
},
"tasks": {
"title": "Tasks",
"description": "The Tasks to execute within this Job",
"type": "array",
"minItems": 1,
"uniqueItems": false,
"additionalItems": false,
"items": {
"title": "Task",
"description": "A Task is a simple process holding a name, a description, steps to run a command and following Tasks",
"$ref": "#/definitions/task",
"additionalProperties": false
}
}
},
"required": [
"jobName",
"workingDir",
"timeout",
"tasks"
]
}