@eclipse-che/che-devworkspace-generator 7.78.0-next-5aa7ed4 → 7.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/lib/api/devfile-context.d.ts +10 -0
  2. package/lib/api/devfile-context.js +12 -0
  3. package/lib/api/devfile-context.js.map +1 -1
  4. package/lib/devfile-schema/2.0.0/devfile.json +2852 -0
  5. package/lib/devfile-schema/2.1.0/devfile.json +1430 -0
  6. package/lib/devfile-schema/2.2.0/devfile.json +2037 -0
  7. package/lib/devfile-schema/2.2.1/devfile.json +2048 -0
  8. package/lib/devfile-schema/2.2.2/devfile.json +2211 -0
  9. package/lib/devfile-schema/devfile-schema-module.d.ts +12 -0
  10. package/lib/devfile-schema/devfile-schema-module.js +19 -0
  11. package/lib/devfile-schema/devfile-schema-module.js.map +1 -0
  12. package/lib/devfile-schema/devfile-schema-validator.d.ts +5878 -0
  13. package/lib/devfile-schema/devfile-schema-validator.js +77 -0
  14. package/lib/devfile-schema/devfile-schema-validator.js.map +1 -0
  15. package/lib/generate.js +1 -1
  16. package/lib/generate.js.map +1 -1
  17. package/lib/inversify/inversify-binding.js +2 -0
  18. package/lib/inversify/inversify-binding.js.map +1 -1
  19. package/lib/main.js +14 -1
  20. package/lib/main.js.map +1 -1
  21. package/package.json +2 -1
  22. package/src/api/devfile-context.ts +11 -0
  23. package/src/devfile-schema/2.0.0/devfile.json +2852 -0
  24. package/src/devfile-schema/2.1.0/devfile.json +1430 -0
  25. package/src/devfile-schema/2.2.0/devfile.json +2037 -0
  26. package/src/devfile-schema/2.2.1/devfile.json +2048 -0
  27. package/src/devfile-schema/2.2.2/devfile.json +2211 -0
  28. package/src/devfile-schema/devfile-schema-module.ts +18 -0
  29. package/src/devfile-schema/devfile-schema-validator.ts +46 -0
  30. package/src/generate.ts +1 -2
  31. package/src/inversify/inversify-binding.ts +2 -0
  32. package/src/main.ts +20 -0
@@ -0,0 +1,1430 @@
1
+ {
2
+ "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.",
3
+ "type": "object",
4
+ "title": "Devfile schema - Version 2.1.0",
5
+ "required": ["schemaVersion"],
6
+ "properties": {
7
+ "attributes": {
8
+ "description": "Map of implementation-dependant free-form YAML attributes.",
9
+ "type": "object",
10
+ "additionalProperties": true
11
+ },
12
+ "commands": {
13
+ "description": "Predefined, ready-to-use, devworkspace-related commands",
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "required": ["id"],
18
+ "oneOf": [
19
+ {
20
+ "required": ["exec"]
21
+ },
22
+ {
23
+ "required": ["apply"]
24
+ },
25
+ {
26
+ "required": ["composite"]
27
+ }
28
+ ],
29
+ "properties": {
30
+ "apply": {
31
+ "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default.",
32
+ "type": "object",
33
+ "required": ["component"],
34
+ "properties": {
35
+ "component": {
36
+ "description": "Describes component that will be applied",
37
+ "type": "string"
38
+ },
39
+ "group": {
40
+ "description": "Defines the group this command is part of",
41
+ "type": "object",
42
+ "required": ["kind"],
43
+ "properties": {
44
+ "isDefault": {
45
+ "description": "Identifies the default command for a given group kind",
46
+ "type": "boolean"
47
+ },
48
+ "kind": {
49
+ "description": "Kind of group the command is part of",
50
+ "type": "string",
51
+ "enum": ["build", "run", "test", "debug"]
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ },
56
+ "label": {
57
+ "description": "Optional label that provides a label for this command to be used in Editor UI menus for example",
58
+ "type": "string"
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ },
63
+ "attributes": {
64
+ "description": "Map of implementation-dependant free-form YAML attributes.",
65
+ "type": "object",
66
+ "additionalProperties": true
67
+ },
68
+ "composite": {
69
+ "description": "Composite command that allows executing several sub-commands either sequentially or concurrently",
70
+ "type": "object",
71
+ "properties": {
72
+ "commands": {
73
+ "description": "The commands that comprise this composite command",
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "group": {
80
+ "description": "Defines the group this command is part of",
81
+ "type": "object",
82
+ "required": ["kind"],
83
+ "properties": {
84
+ "isDefault": {
85
+ "description": "Identifies the default command for a given group kind",
86
+ "type": "boolean"
87
+ },
88
+ "kind": {
89
+ "description": "Kind of group the command is part of",
90
+ "type": "string",
91
+ "enum": ["build", "run", "test", "debug"]
92
+ }
93
+ },
94
+ "additionalProperties": false
95
+ },
96
+ "label": {
97
+ "description": "Optional label that provides a label for this command to be used in Editor UI menus for example",
98
+ "type": "string"
99
+ },
100
+ "parallel": {
101
+ "description": "Indicates if the sub-commands should be executed concurrently",
102
+ "type": "boolean"
103
+ }
104
+ },
105
+ "additionalProperties": false
106
+ },
107
+ "exec": {
108
+ "description": "CLI Command executed in an existing component container",
109
+ "type": "object",
110
+ "required": ["commandLine", "component"],
111
+ "properties": {
112
+ "commandLine": {
113
+ "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.",
114
+ "type": "string"
115
+ },
116
+ "component": {
117
+ "description": "Describes component to which given action relates",
118
+ "type": "string"
119
+ },
120
+ "env": {
121
+ "description": "Optional list of environment variables that have to be set before running the command",
122
+ "type": "array",
123
+ "items": {
124
+ "type": "object",
125
+ "required": ["name", "value"],
126
+ "properties": {
127
+ "name": {
128
+ "type": "string"
129
+ },
130
+ "value": {
131
+ "type": "string"
132
+ }
133
+ },
134
+ "additionalProperties": false
135
+ }
136
+ },
137
+ "group": {
138
+ "description": "Defines the group this command is part of",
139
+ "type": "object",
140
+ "required": ["kind"],
141
+ "properties": {
142
+ "isDefault": {
143
+ "description": "Identifies the default command for a given group kind",
144
+ "type": "boolean"
145
+ },
146
+ "kind": {
147
+ "description": "Kind of group the command is part of",
148
+ "type": "string",
149
+ "enum": ["build", "run", "test", "debug"]
150
+ }
151
+ },
152
+ "additionalProperties": false
153
+ },
154
+ "hotReloadCapable": {
155
+ "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`",
156
+ "type": "boolean"
157
+ },
158
+ "label": {
159
+ "description": "Optional label that provides a label for this command to be used in Editor UI menus for example",
160
+ "type": "string"
161
+ },
162
+ "workingDir": {
163
+ "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.",
164
+ "type": "string"
165
+ }
166
+ },
167
+ "additionalProperties": false
168
+ },
169
+ "id": {
170
+ "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.",
171
+ "type": "string",
172
+ "maxLength": 63,
173
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
174
+ }
175
+ },
176
+ "additionalProperties": false
177
+ }
178
+ },
179
+ "components": {
180
+ "description": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components",
181
+ "type": "array",
182
+ "items": {
183
+ "type": "object",
184
+ "required": ["name"],
185
+ "oneOf": [
186
+ {
187
+ "required": ["container"]
188
+ },
189
+ {
190
+ "required": ["kubernetes"]
191
+ },
192
+ {
193
+ "required": ["openshift"]
194
+ },
195
+ {
196
+ "required": ["volume"]
197
+ }
198
+ ],
199
+ "properties": {
200
+ "attributes": {
201
+ "description": "Map of implementation-dependant free-form YAML attributes.",
202
+ "type": "object",
203
+ "additionalProperties": true
204
+ },
205
+ "container": {
206
+ "description": "Allows adding and configuring devworkspace-related containers",
207
+ "type": "object",
208
+ "required": ["image"],
209
+ "properties": {
210
+ "args": {
211
+ "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.",
212
+ "type": "array",
213
+ "items": {
214
+ "type": "string"
215
+ }
216
+ },
217
+ "command": {
218
+ "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.",
219
+ "type": "array",
220
+ "items": {
221
+ "type": "string"
222
+ }
223
+ },
224
+ "cpuLimit": {
225
+ "type": "string"
226
+ },
227
+ "cpuRequest": {
228
+ "type": "string"
229
+ },
230
+ "dedicatedPod": {
231
+ "description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`",
232
+ "type": "boolean"
233
+ },
234
+ "endpoints": {
235
+ "type": "array",
236
+ "items": {
237
+ "type": "object",
238
+ "required": ["name", "targetPort"],
239
+ "properties": {
240
+ "attributes": {
241
+ "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",",
242
+ "type": "object",
243
+ "additionalProperties": true
244
+ },
245
+ "exposure": {
246
+ "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`",
247
+ "type": "string",
248
+ "default": "public",
249
+ "enum": ["public", "internal", "none"]
250
+ },
251
+ "name": {
252
+ "type": "string",
253
+ "maxLength": 63,
254
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
255
+ },
256
+ "path": {
257
+ "description": "Path of the endpoint URL",
258
+ "type": "string"
259
+ },
260
+ "protocol": {
261
+ "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`",
262
+ "type": "string",
263
+ "default": "http",
264
+ "enum": ["http", "https", "ws", "wss", "tcp", "udp"]
265
+ },
266
+ "secure": {
267
+ "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.",
268
+ "type": "boolean"
269
+ },
270
+ "targetPort": {
271
+ "type": "integer"
272
+ }
273
+ },
274
+ "additionalProperties": false
275
+ }
276
+ },
277
+ "env": {
278
+ "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`",
279
+ "type": "array",
280
+ "items": {
281
+ "type": "object",
282
+ "required": ["name", "value"],
283
+ "properties": {
284
+ "name": {
285
+ "type": "string"
286
+ },
287
+ "value": {
288
+ "type": "string"
289
+ }
290
+ },
291
+ "additionalProperties": false
292
+ }
293
+ },
294
+ "image": {
295
+ "type": "string"
296
+ },
297
+ "memoryLimit": {
298
+ "type": "string"
299
+ },
300
+ "memoryRequest": {
301
+ "type": "string"
302
+ },
303
+ "mountSources": {
304
+ "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.",
305
+ "type": "boolean"
306
+ },
307
+ "sourceMapping": {
308
+ "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.",
309
+ "type": "string",
310
+ "default": "/projects"
311
+ },
312
+ "volumeMounts": {
313
+ "description": "List of volumes mounts that should be mounted is this container.",
314
+ "type": "array",
315
+ "items": {
316
+ "description": "Volume that should be mounted to a component container",
317
+ "type": "object",
318
+ "required": ["name"],
319
+ "properties": {
320
+ "name": {
321
+ "description": "The volume mount name is the name of an existing `Volume` component. If several containers mount the same volume name then they will reuse the same volume and will be able to access to the same files.",
322
+ "type": "string",
323
+ "maxLength": 63,
324
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
325
+ },
326
+ "path": {
327
+ "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.",
328
+ "type": "string"
329
+ }
330
+ },
331
+ "additionalProperties": false
332
+ }
333
+ }
334
+ },
335
+ "additionalProperties": false
336
+ },
337
+ "kubernetes": {
338
+ "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.",
339
+ "type": "object",
340
+ "oneOf": [
341
+ {
342
+ "required": ["uri"]
343
+ },
344
+ {
345
+ "required": ["inlined"]
346
+ }
347
+ ],
348
+ "properties": {
349
+ "endpoints": {
350
+ "type": "array",
351
+ "items": {
352
+ "type": "object",
353
+ "required": ["name", "targetPort"],
354
+ "properties": {
355
+ "attributes": {
356
+ "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",",
357
+ "type": "object",
358
+ "additionalProperties": true
359
+ },
360
+ "exposure": {
361
+ "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`",
362
+ "type": "string",
363
+ "default": "public",
364
+ "enum": ["public", "internal", "none"]
365
+ },
366
+ "name": {
367
+ "type": "string",
368
+ "maxLength": 63,
369
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
370
+ },
371
+ "path": {
372
+ "description": "Path of the endpoint URL",
373
+ "type": "string"
374
+ },
375
+ "protocol": {
376
+ "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`",
377
+ "type": "string",
378
+ "default": "http",
379
+ "enum": ["http", "https", "ws", "wss", "tcp", "udp"]
380
+ },
381
+ "secure": {
382
+ "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.",
383
+ "type": "boolean"
384
+ },
385
+ "targetPort": {
386
+ "type": "integer"
387
+ }
388
+ },
389
+ "additionalProperties": false
390
+ }
391
+ },
392
+ "inlined": {
393
+ "description": "Inlined manifest",
394
+ "type": "string"
395
+ },
396
+ "uri": {
397
+ "description": "Location in a file fetched from a uri.",
398
+ "type": "string"
399
+ }
400
+ },
401
+ "additionalProperties": false
402
+ },
403
+ "name": {
404
+ "description": "Mandatory name that allows referencing the component from other elements (such as commands) or from an external devfile that may reference this component through a parent or a plugin.",
405
+ "type": "string",
406
+ "maxLength": 63,
407
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
408
+ },
409
+ "openshift": {
410
+ "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.",
411
+ "type": "object",
412
+ "oneOf": [
413
+ {
414
+ "required": ["uri"]
415
+ },
416
+ {
417
+ "required": ["inlined"]
418
+ }
419
+ ],
420
+ "properties": {
421
+ "endpoints": {
422
+ "type": "array",
423
+ "items": {
424
+ "type": "object",
425
+ "required": ["name", "targetPort"],
426
+ "properties": {
427
+ "attributes": {
428
+ "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",",
429
+ "type": "object",
430
+ "additionalProperties": true
431
+ },
432
+ "exposure": {
433
+ "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`",
434
+ "type": "string",
435
+ "default": "public",
436
+ "enum": ["public", "internal", "none"]
437
+ },
438
+ "name": {
439
+ "type": "string",
440
+ "maxLength": 63,
441
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
442
+ },
443
+ "path": {
444
+ "description": "Path of the endpoint URL",
445
+ "type": "string"
446
+ },
447
+ "protocol": {
448
+ "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`",
449
+ "type": "string",
450
+ "default": "http",
451
+ "enum": ["http", "https", "ws", "wss", "tcp", "udp"]
452
+ },
453
+ "secure": {
454
+ "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.",
455
+ "type": "boolean"
456
+ },
457
+ "targetPort": {
458
+ "type": "integer"
459
+ }
460
+ },
461
+ "additionalProperties": false
462
+ }
463
+ },
464
+ "inlined": {
465
+ "description": "Inlined manifest",
466
+ "type": "string"
467
+ },
468
+ "uri": {
469
+ "description": "Location in a file fetched from a uri.",
470
+ "type": "string"
471
+ }
472
+ },
473
+ "additionalProperties": false
474
+ },
475
+ "volume": {
476
+ "description": "Allows specifying the definition of a volume shared by several other components",
477
+ "type": "object",
478
+ "properties": {
479
+ "ephemeral": {
480
+ "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false",
481
+ "type": "boolean"
482
+ },
483
+ "size": {
484
+ "description": "Size of the volume",
485
+ "type": "string"
486
+ }
487
+ },
488
+ "additionalProperties": false
489
+ }
490
+ },
491
+ "additionalProperties": false
492
+ }
493
+ },
494
+ "events": {
495
+ "description": "Bindings of commands to events. Each command is referred-to by its name.",
496
+ "type": "object",
497
+ "properties": {
498
+ "postStart": {
499
+ "description": "IDs of commands that should be executed after the devworkspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser.",
500
+ "type": "array",
501
+ "items": {
502
+ "type": "string"
503
+ }
504
+ },
505
+ "postStop": {
506
+ "description": "IDs of commands that should be executed after stopping the devworkspace.",
507
+ "type": "array",
508
+ "items": {
509
+ "type": "string"
510
+ }
511
+ },
512
+ "preStart": {
513
+ "description": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD.",
514
+ "type": "array",
515
+ "items": {
516
+ "type": "string"
517
+ }
518
+ },
519
+ "preStop": {
520
+ "description": "IDs of commands that should be executed before stopping the devworkspace.",
521
+ "type": "array",
522
+ "items": {
523
+ "type": "string"
524
+ }
525
+ }
526
+ },
527
+ "additionalProperties": false
528
+ },
529
+ "metadata": {
530
+ "description": "Optional metadata",
531
+ "type": "object",
532
+ "properties": {
533
+ "attributes": {
534
+ "description": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead.",
535
+ "type": "object",
536
+ "additionalProperties": true
537
+ },
538
+ "description": {
539
+ "description": "Optional devfile description",
540
+ "type": "string"
541
+ },
542
+ "displayName": {
543
+ "description": "Optional devfile display name",
544
+ "type": "string"
545
+ },
546
+ "globalMemoryLimit": {
547
+ "description": "Optional devfile global memory limit",
548
+ "type": "string"
549
+ },
550
+ "icon": {
551
+ "description": "Optional devfile icon, can be a URI or a relative path in the project",
552
+ "type": "string"
553
+ },
554
+ "language": {
555
+ "description": "Optional devfile language",
556
+ "type": "string"
557
+ },
558
+ "name": {
559
+ "description": "Optional devfile name",
560
+ "type": "string"
561
+ },
562
+ "projectType": {
563
+ "description": "Optional devfile project type",
564
+ "type": "string"
565
+ },
566
+ "tags": {
567
+ "description": "Optional devfile tags",
568
+ "type": "array",
569
+ "items": {
570
+ "type": "string"
571
+ }
572
+ },
573
+ "version": {
574
+ "description": "Optional semver-compatible version",
575
+ "type": "string",
576
+ "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
577
+ },
578
+ "website": {
579
+ "description": "Optional devfile website",
580
+ "type": "string"
581
+ }
582
+ },
583
+ "additionalProperties": true
584
+ },
585
+ "parent": {
586
+ "description": "Parent devworkspace template",
587
+ "type": "object",
588
+ "oneOf": [
589
+ {
590
+ "required": ["uri"]
591
+ },
592
+ {
593
+ "required": ["id"]
594
+ },
595
+ {
596
+ "required": ["kubernetes"]
597
+ }
598
+ ],
599
+ "properties": {
600
+ "attributes": {
601
+ "description": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.",
602
+ "type": "object",
603
+ "additionalProperties": true
604
+ },
605
+ "commands": {
606
+ "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.",
607
+ "type": "array",
608
+ "items": {
609
+ "type": "object",
610
+ "required": ["id"],
611
+ "oneOf": [
612
+ {
613
+ "required": ["exec"]
614
+ },
615
+ {
616
+ "required": ["apply"]
617
+ },
618
+ {
619
+ "required": ["composite"]
620
+ }
621
+ ],
622
+ "properties": {
623
+ "apply": {
624
+ "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default.",
625
+ "type": "object",
626
+ "properties": {
627
+ "component": {
628
+ "description": "Describes component that will be applied",
629
+ "type": "string"
630
+ },
631
+ "group": {
632
+ "description": "Defines the group this command is part of",
633
+ "type": "object",
634
+ "properties": {
635
+ "isDefault": {
636
+ "description": "Identifies the default command for a given group kind",
637
+ "type": "boolean"
638
+ },
639
+ "kind": {
640
+ "description": "Kind of group the command is part of",
641
+ "type": "string",
642
+ "enum": ["build", "run", "test", "debug"]
643
+ }
644
+ },
645
+ "additionalProperties": false
646
+ },
647
+ "label": {
648
+ "description": "Optional label that provides a label for this command to be used in Editor UI menus for example",
649
+ "type": "string"
650
+ }
651
+ },
652
+ "additionalProperties": false
653
+ },
654
+ "attributes": {
655
+ "description": "Map of implementation-dependant free-form YAML attributes.",
656
+ "type": "object",
657
+ "additionalProperties": true
658
+ },
659
+ "composite": {
660
+ "description": "Composite command that allows executing several sub-commands either sequentially or concurrently",
661
+ "type": "object",
662
+ "properties": {
663
+ "commands": {
664
+ "description": "The commands that comprise this composite command",
665
+ "type": "array",
666
+ "items": {
667
+ "type": "string"
668
+ }
669
+ },
670
+ "group": {
671
+ "description": "Defines the group this command is part of",
672
+ "type": "object",
673
+ "properties": {
674
+ "isDefault": {
675
+ "description": "Identifies the default command for a given group kind",
676
+ "type": "boolean"
677
+ },
678
+ "kind": {
679
+ "description": "Kind of group the command is part of",
680
+ "type": "string",
681
+ "enum": ["build", "run", "test", "debug"]
682
+ }
683
+ },
684
+ "additionalProperties": false
685
+ },
686
+ "label": {
687
+ "description": "Optional label that provides a label for this command to be used in Editor UI menus for example",
688
+ "type": "string"
689
+ },
690
+ "parallel": {
691
+ "description": "Indicates if the sub-commands should be executed concurrently",
692
+ "type": "boolean"
693
+ }
694
+ },
695
+ "additionalProperties": false
696
+ },
697
+ "exec": {
698
+ "description": "CLI Command executed in an existing component container",
699
+ "type": "object",
700
+ "properties": {
701
+ "commandLine": {
702
+ "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.",
703
+ "type": "string"
704
+ },
705
+ "component": {
706
+ "description": "Describes component to which given action relates",
707
+ "type": "string"
708
+ },
709
+ "env": {
710
+ "description": "Optional list of environment variables that have to be set before running the command",
711
+ "type": "array",
712
+ "items": {
713
+ "type": "object",
714
+ "required": ["name"],
715
+ "properties": {
716
+ "name": {
717
+ "type": "string"
718
+ },
719
+ "value": {
720
+ "type": "string"
721
+ }
722
+ },
723
+ "additionalProperties": false
724
+ }
725
+ },
726
+ "group": {
727
+ "description": "Defines the group this command is part of",
728
+ "type": "object",
729
+ "properties": {
730
+ "isDefault": {
731
+ "description": "Identifies the default command for a given group kind",
732
+ "type": "boolean"
733
+ },
734
+ "kind": {
735
+ "description": "Kind of group the command is part of",
736
+ "type": "string",
737
+ "enum": ["build", "run", "test", "debug"]
738
+ }
739
+ },
740
+ "additionalProperties": false
741
+ },
742
+ "hotReloadCapable": {
743
+ "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`",
744
+ "type": "boolean"
745
+ },
746
+ "label": {
747
+ "description": "Optional label that provides a label for this command to be used in Editor UI menus for example",
748
+ "type": "string"
749
+ },
750
+ "workingDir": {
751
+ "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.",
752
+ "type": "string"
753
+ }
754
+ },
755
+ "additionalProperties": false
756
+ },
757
+ "id": {
758
+ "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.",
759
+ "type": "string",
760
+ "maxLength": 63,
761
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
762
+ }
763
+ },
764
+ "additionalProperties": false
765
+ }
766
+ },
767
+ "components": {
768
+ "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.",
769
+ "type": "array",
770
+ "items": {
771
+ "type": "object",
772
+ "required": ["name"],
773
+ "oneOf": [
774
+ {
775
+ "required": ["container"]
776
+ },
777
+ {
778
+ "required": ["kubernetes"]
779
+ },
780
+ {
781
+ "required": ["openshift"]
782
+ },
783
+ {
784
+ "required": ["volume"]
785
+ }
786
+ ],
787
+ "properties": {
788
+ "attributes": {
789
+ "description": "Map of implementation-dependant free-form YAML attributes.",
790
+ "type": "object",
791
+ "additionalProperties": true
792
+ },
793
+ "container": {
794
+ "description": "Allows adding and configuring devworkspace-related containers",
795
+ "type": "object",
796
+ "properties": {
797
+ "args": {
798
+ "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.",
799
+ "type": "array",
800
+ "items": {
801
+ "type": "string"
802
+ }
803
+ },
804
+ "command": {
805
+ "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.",
806
+ "type": "array",
807
+ "items": {
808
+ "type": "string"
809
+ }
810
+ },
811
+ "cpuLimit": {
812
+ "type": "string"
813
+ },
814
+ "cpuRequest": {
815
+ "type": "string"
816
+ },
817
+ "dedicatedPod": {
818
+ "description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`",
819
+ "type": "boolean"
820
+ },
821
+ "endpoints": {
822
+ "type": "array",
823
+ "items": {
824
+ "type": "object",
825
+ "required": ["name"],
826
+ "properties": {
827
+ "attributes": {
828
+ "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",",
829
+ "type": "object",
830
+ "additionalProperties": true
831
+ },
832
+ "exposure": {
833
+ "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`",
834
+ "type": "string",
835
+ "enum": ["public", "internal", "none"]
836
+ },
837
+ "name": {
838
+ "type": "string",
839
+ "maxLength": 63,
840
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
841
+ },
842
+ "path": {
843
+ "description": "Path of the endpoint URL",
844
+ "type": "string"
845
+ },
846
+ "protocol": {
847
+ "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`",
848
+ "type": "string",
849
+ "enum": ["http", "https", "ws", "wss", "tcp", "udp"]
850
+ },
851
+ "secure": {
852
+ "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.",
853
+ "type": "boolean"
854
+ },
855
+ "targetPort": {
856
+ "type": "integer"
857
+ }
858
+ },
859
+ "additionalProperties": false
860
+ }
861
+ },
862
+ "env": {
863
+ "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`",
864
+ "type": "array",
865
+ "items": {
866
+ "type": "object",
867
+ "required": ["name"],
868
+ "properties": {
869
+ "name": {
870
+ "type": "string"
871
+ },
872
+ "value": {
873
+ "type": "string"
874
+ }
875
+ },
876
+ "additionalProperties": false
877
+ }
878
+ },
879
+ "image": {
880
+ "type": "string"
881
+ },
882
+ "memoryLimit": {
883
+ "type": "string"
884
+ },
885
+ "memoryRequest": {
886
+ "type": "string"
887
+ },
888
+ "mountSources": {
889
+ "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.",
890
+ "type": "boolean"
891
+ },
892
+ "sourceMapping": {
893
+ "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.",
894
+ "type": "string"
895
+ },
896
+ "volumeMounts": {
897
+ "description": "List of volumes mounts that should be mounted is this container.",
898
+ "type": "array",
899
+ "items": {
900
+ "description": "Volume that should be mounted to a component container",
901
+ "type": "object",
902
+ "required": ["name"],
903
+ "properties": {
904
+ "name": {
905
+ "description": "The volume mount name is the name of an existing `Volume` component. If several containers mount the same volume name then they will reuse the same volume and will be able to access to the same files.",
906
+ "type": "string",
907
+ "maxLength": 63,
908
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
909
+ },
910
+ "path": {
911
+ "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.",
912
+ "type": "string"
913
+ }
914
+ },
915
+ "additionalProperties": false
916
+ }
917
+ }
918
+ },
919
+ "additionalProperties": false
920
+ },
921
+ "kubernetes": {
922
+ "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.",
923
+ "type": "object",
924
+ "oneOf": [
925
+ {
926
+ "required": ["uri"]
927
+ },
928
+ {
929
+ "required": ["inlined"]
930
+ }
931
+ ],
932
+ "properties": {
933
+ "endpoints": {
934
+ "type": "array",
935
+ "items": {
936
+ "type": "object",
937
+ "required": ["name"],
938
+ "properties": {
939
+ "attributes": {
940
+ "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",",
941
+ "type": "object",
942
+ "additionalProperties": true
943
+ },
944
+ "exposure": {
945
+ "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`",
946
+ "type": "string",
947
+ "enum": ["public", "internal", "none"]
948
+ },
949
+ "name": {
950
+ "type": "string",
951
+ "maxLength": 63,
952
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
953
+ },
954
+ "path": {
955
+ "description": "Path of the endpoint URL",
956
+ "type": "string"
957
+ },
958
+ "protocol": {
959
+ "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`",
960
+ "type": "string",
961
+ "enum": ["http", "https", "ws", "wss", "tcp", "udp"]
962
+ },
963
+ "secure": {
964
+ "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.",
965
+ "type": "boolean"
966
+ },
967
+ "targetPort": {
968
+ "type": "integer"
969
+ }
970
+ },
971
+ "additionalProperties": false
972
+ }
973
+ },
974
+ "inlined": {
975
+ "description": "Inlined manifest",
976
+ "type": "string"
977
+ },
978
+ "uri": {
979
+ "description": "Location in a file fetched from a uri.",
980
+ "type": "string"
981
+ }
982
+ },
983
+ "additionalProperties": false
984
+ },
985
+ "name": {
986
+ "description": "Mandatory name that allows referencing the component from other elements (such as commands) or from an external devfile that may reference this component through a parent or a plugin.",
987
+ "type": "string",
988
+ "maxLength": 63,
989
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
990
+ },
991
+ "openshift": {
992
+ "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.",
993
+ "type": "object",
994
+ "oneOf": [
995
+ {
996
+ "required": ["uri"]
997
+ },
998
+ {
999
+ "required": ["inlined"]
1000
+ }
1001
+ ],
1002
+ "properties": {
1003
+ "endpoints": {
1004
+ "type": "array",
1005
+ "items": {
1006
+ "type": "object",
1007
+ "required": ["name"],
1008
+ "properties": {
1009
+ "attributes": {
1010
+ "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",",
1011
+ "type": "object",
1012
+ "additionalProperties": true
1013
+ },
1014
+ "exposure": {
1015
+ "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`",
1016
+ "type": "string",
1017
+ "enum": ["public", "internal", "none"]
1018
+ },
1019
+ "name": {
1020
+ "type": "string",
1021
+ "maxLength": 63,
1022
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
1023
+ },
1024
+ "path": {
1025
+ "description": "Path of the endpoint URL",
1026
+ "type": "string"
1027
+ },
1028
+ "protocol": {
1029
+ "description": "Describes the application and transport protocols of the traffic that will go through this endpoint.\n- `http`: Endpoint will have `http` traffic, typically on a TCP connection. It will be automaticaly promoted to `https` when the `secure` field is set to `true`.\n- `https`: Endpoint will have `https` traffic, typically on a TCP connection.\n- `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.\n- `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.\n- `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.\n- `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.\n\nDefault value is `http`",
1030
+ "type": "string",
1031
+ "enum": ["http", "https", "ws", "wss", "tcp", "udp"]
1032
+ },
1033
+ "secure": {
1034
+ "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.",
1035
+ "type": "boolean"
1036
+ },
1037
+ "targetPort": {
1038
+ "type": "integer"
1039
+ }
1040
+ },
1041
+ "additionalProperties": false
1042
+ }
1043
+ },
1044
+ "inlined": {
1045
+ "description": "Inlined manifest",
1046
+ "type": "string"
1047
+ },
1048
+ "uri": {
1049
+ "description": "Location in a file fetched from a uri.",
1050
+ "type": "string"
1051
+ }
1052
+ },
1053
+ "additionalProperties": false
1054
+ },
1055
+ "volume": {
1056
+ "description": "Allows specifying the definition of a volume shared by several other components",
1057
+ "type": "object",
1058
+ "properties": {
1059
+ "ephemeral": {
1060
+ "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false",
1061
+ "type": "boolean"
1062
+ },
1063
+ "size": {
1064
+ "description": "Size of the volume",
1065
+ "type": "string"
1066
+ }
1067
+ },
1068
+ "additionalProperties": false
1069
+ }
1070
+ },
1071
+ "additionalProperties": false
1072
+ }
1073
+ },
1074
+ "id": {
1075
+ "description": "Id in a registry that contains a Devfile yaml file",
1076
+ "type": "string"
1077
+ },
1078
+ "kubernetes": {
1079
+ "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate",
1080
+ "type": "object",
1081
+ "required": ["name"],
1082
+ "properties": {
1083
+ "name": {
1084
+ "type": "string"
1085
+ },
1086
+ "namespace": {
1087
+ "type": "string"
1088
+ }
1089
+ },
1090
+ "additionalProperties": false
1091
+ },
1092
+ "projects": {
1093
+ "description": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.",
1094
+ "type": "array",
1095
+ "items": {
1096
+ "type": "object",
1097
+ "required": ["name"],
1098
+ "oneOf": [
1099
+ {
1100
+ "required": ["git"]
1101
+ },
1102
+ {
1103
+ "required": ["zip"]
1104
+ }
1105
+ ],
1106
+ "properties": {
1107
+ "attributes": {
1108
+ "description": "Map of implementation-dependant free-form YAML attributes.",
1109
+ "type": "object",
1110
+ "additionalProperties": true
1111
+ },
1112
+ "clonePath": {
1113
+ "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.",
1114
+ "type": "string"
1115
+ },
1116
+ "git": {
1117
+ "description": "Project's Git source",
1118
+ "type": "object",
1119
+ "properties": {
1120
+ "checkoutFrom": {
1121
+ "description": "Defines from what the project should be checked out. Required if there are more than one remote configured",
1122
+ "type": "object",
1123
+ "properties": {
1124
+ "remote": {
1125
+ "description": "The remote name should be used as init. Required if there are more than one remote configured",
1126
+ "type": "string"
1127
+ },
1128
+ "revision": {
1129
+ "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.",
1130
+ "type": "string"
1131
+ }
1132
+ },
1133
+ "additionalProperties": false
1134
+ },
1135
+ "remotes": {
1136
+ "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured",
1137
+ "type": "object",
1138
+ "additionalProperties": {
1139
+ "type": "string"
1140
+ }
1141
+ }
1142
+ },
1143
+ "additionalProperties": false
1144
+ },
1145
+ "name": {
1146
+ "description": "Project name",
1147
+ "type": "string",
1148
+ "maxLength": 63,
1149
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
1150
+ },
1151
+ "zip": {
1152
+ "description": "Project's Zip source",
1153
+ "type": "object",
1154
+ "properties": {
1155
+ "location": {
1156
+ "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH",
1157
+ "type": "string"
1158
+ }
1159
+ },
1160
+ "additionalProperties": false
1161
+ }
1162
+ },
1163
+ "additionalProperties": false
1164
+ }
1165
+ },
1166
+ "registryUrl": {
1167
+ "description": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `regsitryURL` when `Id` is used.",
1168
+ "type": "string"
1169
+ },
1170
+ "starterProjects": {
1171
+ "description": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.",
1172
+ "type": "array",
1173
+ "items": {
1174
+ "type": "object",
1175
+ "required": ["name"],
1176
+ "oneOf": [
1177
+ {
1178
+ "required": ["git"]
1179
+ },
1180
+ {
1181
+ "required": ["zip"]
1182
+ }
1183
+ ],
1184
+ "properties": {
1185
+ "attributes": {
1186
+ "description": "Map of implementation-dependant free-form YAML attributes.",
1187
+ "type": "object",
1188
+ "additionalProperties": true
1189
+ },
1190
+ "description": {
1191
+ "description": "Description of a starter project",
1192
+ "type": "string"
1193
+ },
1194
+ "git": {
1195
+ "description": "Project's Git source",
1196
+ "type": "object",
1197
+ "properties": {
1198
+ "checkoutFrom": {
1199
+ "description": "Defines from what the project should be checked out. Required if there are more than one remote configured",
1200
+ "type": "object",
1201
+ "properties": {
1202
+ "remote": {
1203
+ "description": "The remote name should be used as init. Required if there are more than one remote configured",
1204
+ "type": "string"
1205
+ },
1206
+ "revision": {
1207
+ "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.",
1208
+ "type": "string"
1209
+ }
1210
+ },
1211
+ "additionalProperties": false
1212
+ },
1213
+ "remotes": {
1214
+ "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured",
1215
+ "type": "object",
1216
+ "additionalProperties": {
1217
+ "type": "string"
1218
+ }
1219
+ }
1220
+ },
1221
+ "additionalProperties": false
1222
+ },
1223
+ "name": {
1224
+ "description": "Project name",
1225
+ "type": "string",
1226
+ "maxLength": 63,
1227
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
1228
+ },
1229
+ "subDir": {
1230
+ "description": "Sub-directory from a starter project to be used as root for starter project.",
1231
+ "type": "string"
1232
+ },
1233
+ "zip": {
1234
+ "description": "Project's Zip source",
1235
+ "type": "object",
1236
+ "properties": {
1237
+ "location": {
1238
+ "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH",
1239
+ "type": "string"
1240
+ }
1241
+ },
1242
+ "additionalProperties": false
1243
+ }
1244
+ },
1245
+ "additionalProperties": false
1246
+ }
1247
+ },
1248
+ "uri": {
1249
+ "description": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI.",
1250
+ "type": "string"
1251
+ },
1252
+ "variables": {
1253
+ "description": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.",
1254
+ "type": "object",
1255
+ "additionalProperties": {
1256
+ "type": "string"
1257
+ }
1258
+ }
1259
+ },
1260
+ "additionalProperties": false
1261
+ },
1262
+ "projects": {
1263
+ "description": "Projects worked on in the devworkspace, containing names and sources locations",
1264
+ "type": "array",
1265
+ "items": {
1266
+ "type": "object",
1267
+ "required": ["name"],
1268
+ "oneOf": [
1269
+ {
1270
+ "required": ["git"]
1271
+ },
1272
+ {
1273
+ "required": ["zip"]
1274
+ }
1275
+ ],
1276
+ "properties": {
1277
+ "attributes": {
1278
+ "description": "Map of implementation-dependant free-form YAML attributes.",
1279
+ "type": "object",
1280
+ "additionalProperties": true
1281
+ },
1282
+ "clonePath": {
1283
+ "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.",
1284
+ "type": "string"
1285
+ },
1286
+ "git": {
1287
+ "description": "Project's Git source",
1288
+ "type": "object",
1289
+ "required": ["remotes"],
1290
+ "properties": {
1291
+ "checkoutFrom": {
1292
+ "description": "Defines from what the project should be checked out. Required if there are more than one remote configured",
1293
+ "type": "object",
1294
+ "properties": {
1295
+ "remote": {
1296
+ "description": "The remote name should be used as init. Required if there are more than one remote configured",
1297
+ "type": "string"
1298
+ },
1299
+ "revision": {
1300
+ "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.",
1301
+ "type": "string"
1302
+ }
1303
+ },
1304
+ "additionalProperties": false
1305
+ },
1306
+ "remotes": {
1307
+ "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured",
1308
+ "type": "object",
1309
+ "additionalProperties": {
1310
+ "type": "string"
1311
+ }
1312
+ }
1313
+ },
1314
+ "additionalProperties": false
1315
+ },
1316
+ "name": {
1317
+ "description": "Project name",
1318
+ "type": "string",
1319
+ "maxLength": 63,
1320
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
1321
+ },
1322
+ "zip": {
1323
+ "description": "Project's Zip source",
1324
+ "type": "object",
1325
+ "properties": {
1326
+ "location": {
1327
+ "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH",
1328
+ "type": "string"
1329
+ }
1330
+ },
1331
+ "additionalProperties": false
1332
+ }
1333
+ },
1334
+ "additionalProperties": false
1335
+ }
1336
+ },
1337
+ "schemaVersion": {
1338
+ "description": "Devfile schema version",
1339
+ "type": "string",
1340
+ "pattern": "^2\\.1\\.0$"
1341
+ },
1342
+ "starterProjects": {
1343
+ "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects",
1344
+ "type": "array",
1345
+ "items": {
1346
+ "type": "object",
1347
+ "required": ["name"],
1348
+ "oneOf": [
1349
+ {
1350
+ "required": ["git"]
1351
+ },
1352
+ {
1353
+ "required": ["zip"]
1354
+ }
1355
+ ],
1356
+ "properties": {
1357
+ "attributes": {
1358
+ "description": "Map of implementation-dependant free-form YAML attributes.",
1359
+ "type": "object",
1360
+ "additionalProperties": true
1361
+ },
1362
+ "description": {
1363
+ "description": "Description of a starter project",
1364
+ "type": "string"
1365
+ },
1366
+ "git": {
1367
+ "description": "Project's Git source",
1368
+ "type": "object",
1369
+ "required": ["remotes"],
1370
+ "properties": {
1371
+ "checkoutFrom": {
1372
+ "description": "Defines from what the project should be checked out. Required if there are more than one remote configured",
1373
+ "type": "object",
1374
+ "properties": {
1375
+ "remote": {
1376
+ "description": "The remote name should be used as init. Required if there are more than one remote configured",
1377
+ "type": "string"
1378
+ },
1379
+ "revision": {
1380
+ "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.",
1381
+ "type": "string"
1382
+ }
1383
+ },
1384
+ "additionalProperties": false
1385
+ },
1386
+ "remotes": {
1387
+ "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured",
1388
+ "type": "object",
1389
+ "additionalProperties": {
1390
+ "type": "string"
1391
+ }
1392
+ }
1393
+ },
1394
+ "additionalProperties": false
1395
+ },
1396
+ "name": {
1397
+ "description": "Project name",
1398
+ "type": "string",
1399
+ "maxLength": 63,
1400
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
1401
+ },
1402
+ "subDir": {
1403
+ "description": "Sub-directory from a starter project to be used as root for starter project.",
1404
+ "type": "string"
1405
+ },
1406
+ "zip": {
1407
+ "description": "Project's Zip source",
1408
+ "type": "object",
1409
+ "properties": {
1410
+ "location": {
1411
+ "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH",
1412
+ "type": "string"
1413
+ }
1414
+ },
1415
+ "additionalProperties": false
1416
+ }
1417
+ },
1418
+ "additionalProperties": false
1419
+ }
1420
+ },
1421
+ "variables": {
1422
+ "description": "Map of key-value variables used for string replacement in the devfile. Values can can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source - element identifiers, e.g. command id, component name, endpoint name, project name - references to identifiers, e.g. in events, a command's component, container's volume mount name - string enums, e.g. command group kind, endpoint exposure",
1423
+ "type": "object",
1424
+ "additionalProperties": {
1425
+ "type": "string"
1426
+ }
1427
+ }
1428
+ },
1429
+ "additionalProperties": false
1430
+ }