ddsl 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-06/schema#",
3
+ "$id": "https://raw.githubusercontent.com/bilby91/ddsl/master/docs/ddsl.schema.json",
4
+ "title": "DDSL",
5
+ "description": "Schema for the DDSL file format.",
6
+ "type": "object",
7
+ "required": [
8
+ "version"
9
+ ],
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "version": {
13
+ "type": "integer",
14
+ "enum": [
15
+ 1
16
+ ],
17
+ "description": "Version of the DDSL schema"
18
+ },
19
+ "registries": {
20
+ "type": "array",
21
+ "items": {
22
+ "$ref": "https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/registry.schema.json"
23
+ },
24
+ "default": [],
25
+ "description": "List of registries to authenticate when performing either a build or run operation"
26
+ },
27
+ "builds": {
28
+ "type": "array",
29
+ "items": {
30
+ "$ref": "https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/build.schema.json"
31
+ },
32
+ "description": "List of build tasks to run"
33
+ },
34
+ "runs": {
35
+ "type": "array",
36
+ "items": {
37
+ "$ref": "https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/run.schema.json"
38
+ },
39
+ "description": "List of run tasks to run"
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,118 @@
1
+
2
+ # DDSL Schema
3
+
4
+ ```
5
+ https://raw.githubusercontent.com/bilby91/ddsl/master/docs/ddsl.schema.json
6
+ ```
7
+
8
+ Schema for the DDSL file format.
9
+
10
+ | Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
11
+ |----------|------------|--------|--------------|-------------------|-----------------------|------------|
12
+ | Can be instantiated | No | Experimental | No | Forbidden | Forbidden | [ddsl.schema.json](ddsl.schema.json) |
13
+
14
+ # DDSL Properties
15
+
16
+ | Property | Type | Required | Default | Defined by |
17
+ |----------|------|----------|---------|------------|
18
+ | [builds](#builds) | reference | Optional | | DDSL (this schema) |
19
+ | [registries](#registries) | reference | Optional | `[]` | DDSL (this schema) |
20
+ | [runs](#runs) | reference | Optional | | DDSL (this schema) |
21
+ | [version](#version) | `enum` | **Required** | | DDSL (this schema) |
22
+
23
+ ## builds
24
+
25
+ List of build tasks to run
26
+
27
+ `builds`
28
+
29
+ * is optional
30
+ * type: reference
31
+ * defined in this schema
32
+
33
+ ### builds Type
34
+
35
+
36
+ Array type: reference
37
+
38
+ All items must be of the type:
39
+ * []() – `https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/build.schema.json`
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+ ## registries
49
+
50
+ List of registries to authenticate when performing either a build or run operation
51
+
52
+ `registries`
53
+
54
+ * is optional
55
+ * type: reference
56
+
57
+ * default: `[]`
58
+ * defined in this schema
59
+
60
+ ### registries Type
61
+
62
+
63
+ Array type: reference
64
+
65
+ All items must be of the type:
66
+ * []() – `https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/registry.schema.json`
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+ ## runs
76
+
77
+ List of run tasks to run
78
+
79
+ `runs`
80
+
81
+ * is optional
82
+ * type: reference
83
+ * defined in this schema
84
+
85
+ ### runs Type
86
+
87
+
88
+ Array type: reference
89
+
90
+ All items must be of the type:
91
+ * []() – `https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/run.schema.json`
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ ## version
101
+
102
+ Version of the DDSL schema
103
+
104
+ `version`
105
+
106
+ * is **required**
107
+ * type: `enum`
108
+ * defined in this schema
109
+
110
+ The value of this property **must** be equal to one of the [known values below](#version-known-values).
111
+
112
+ ### version Known Values
113
+ | Value | Description |
114
+ |-------|-------------|
115
+ | `1` | |
116
+
117
+
118
+
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-06/schema#",
3
+ "$id": "https://raw.githubusercontent.com/bilby91/ddsl/master/docs/registry.schema.json",
4
+ "title": "Registry",
5
+ "description": "Information to authenticate with a docker registry",
6
+ "type": "object",
7
+ "required": [
8
+ "url",
9
+ "username",
10
+ "password"
11
+ ],
12
+ "properties": {
13
+ "url": {
14
+ "type": "string",
15
+ "description": "The docker registry server url. If using hub.docker.com as registry use `docker.io`"
16
+ },
17
+ "username": {
18
+ "type": "string",
19
+ "description": "The docker registry username"
20
+ },
21
+ "password": {
22
+ "type": "string",
23
+ "description": "The docker registry username's password"
24
+ },
25
+ "use_cache": {
26
+ "type": "boolean",
27
+ "description": "True if you want to reuse stored credentials under ~/.docker/config.json, false otherwise."
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,104 @@
1
+
2
+ # Registry Schema
3
+
4
+ ```
5
+ https://raw.githubusercontent.com/bilby91/ddsl/master/docs/registry.schema.json
6
+ ```
7
+
8
+ Information to authenticate with a docker registry
9
+
10
+ | Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
11
+ |----------|------------|--------|--------------|-------------------|-----------------------|------------|
12
+ | Can be instantiated | No | Experimental | No | Forbidden | Permitted | [registry.schema.json](registry.schema.json) |
13
+
14
+ # Registry Properties
15
+
16
+ | Property | Type | Required | Defined by |
17
+ |----------|------|----------|------------|
18
+ | [password](#password) | `string` | **Required** | Registry (this schema) |
19
+ | [url](#url) | `string` | **Required** | Registry (this schema) |
20
+ | [use_cache](#use_cache) | `boolean` | Optional | Registry (this schema) |
21
+ | [username](#username) | `string` | **Required** | Registry (this schema) |
22
+ | `*` | any | Additional | this schema *allows* additional properties |
23
+
24
+ ## password
25
+
26
+ The docker registry username's password
27
+
28
+ `password`
29
+
30
+ * is **required**
31
+ * type: `string`
32
+ * defined in this schema
33
+
34
+ ### password Type
35
+
36
+
37
+ `string`
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+ ## url
46
+
47
+ The docker registry server url. If using hub.docker.com as registry use `docker.io`
48
+
49
+ `url`
50
+
51
+ * is **required**
52
+ * type: `string`
53
+ * defined in this schema
54
+
55
+ ### url Type
56
+
57
+
58
+ `string`
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ ## use_cache
67
+
68
+ True if you want to reuse stored credentials under ~/.docker/config.json, false otherwise.
69
+
70
+ `use_cache`
71
+
72
+ * is optional
73
+ * type: `boolean`
74
+ * defined in this schema
75
+
76
+ ### use_cache Type
77
+
78
+
79
+ `boolean`
80
+
81
+
82
+
83
+
84
+
85
+ ## username
86
+
87
+ The docker registry username
88
+
89
+ `username`
90
+
91
+ * is **required**
92
+ * type: `string`
93
+ * defined in this schema
94
+
95
+ ### username Type
96
+
97
+
98
+ `string`
99
+
100
+
101
+
102
+
103
+
104
+
@@ -0,0 +1,142 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-06/schema#",
3
+ "$id": "https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json",
4
+ "title": "Run",
5
+ "description": "Run task to perform using either docker or docker-compose",
6
+ "type": "object",
7
+ "required": [
8
+ "name"
9
+ ],
10
+ "oneOf": [
11
+ {
12
+ "$ref": "#/definitions/run_docker_options"
13
+ },
14
+ {
15
+ "$ref": "#/definitions/run_docker_compose_options"
16
+ }
17
+ ],
18
+ "properties": {
19
+ "name": {
20
+ "type": "string",
21
+ "description": "Unique name to identify the run task."
22
+ }
23
+ },
24
+ "definitions": {
25
+ "run_docker_options": {
26
+ "type": "object",
27
+ "required": [
28
+ "type",
29
+ "image"
30
+ ],
31
+ "properties": {
32
+ "type": {
33
+ "type": "string",
34
+ "enum": [
35
+ "docker"
36
+ ],
37
+ "description": "Type of runner to use"
38
+ },
39
+ "image": {
40
+ "type": "string",
41
+ "description": "The image that the container will use"
42
+ },
43
+ "cmd": {
44
+ "type": "string",
45
+ "description": "Command to run in the the container"
46
+ },
47
+ "user": {
48
+ "type": "string",
49
+ "description": "Username or UID (format: <name|uid>[:<group|gid>])"
50
+ },
51
+ "workdir": {
52
+ "type": "string",
53
+ "description": "Working directory inside the container"
54
+ },
55
+ "rm": {
56
+ "type": "boolean",
57
+ "description": "Automatically remove the container when it exits"
58
+ },
59
+ "env": {
60
+ "type": "object",
61
+ "additionalProperties": {
62
+ "type": "string"
63
+ },
64
+ "description": "Set environment variables"
65
+ },
66
+ "volumes": {
67
+ "type": "object",
68
+ "additionalProperties": {
69
+ "type": "string"
70
+ },
71
+ "description": "Bind mount volumes"
72
+ }
73
+ }
74
+ },
75
+ "run_docker_compose_options": {
76
+ "type": "object",
77
+ "required": [
78
+ "type",
79
+ "service"
80
+ ],
81
+ "properties": {
82
+ "type": {
83
+ "type": "string",
84
+ "enum": [
85
+ "docker-compose"
86
+ ],
87
+ "description": "Type of runner to use"
88
+ },
89
+ "file": {
90
+ "type": "string",
91
+ "description": "Path to the docker-compose file"
92
+ },
93
+ "service": {
94
+ "type": "string",
95
+ "description": "Name of the docker-compose service to build"
96
+ },
97
+ "cmd": {
98
+ "type": "string",
99
+ "description": "Command to run in the the container"
100
+ },
101
+ "rm": {
102
+ "type": "boolean",
103
+ "description": "Remove container after run. Ignored in detached mode"
104
+ },
105
+ "user": {
106
+ "type": "string",
107
+ "description": "Run as specified username or uid"
108
+ },
109
+ "workdir": {
110
+ "type": "string",
111
+ "description": "Working directory inside the container"
112
+ },
113
+ "service_ports": {
114
+ "type": "string",
115
+ "description": "Run command with the service's ports enabled and mapped to the host"
116
+ },
117
+ "detach": {
118
+ "type": "boolean",
119
+ "description": "Detached mode: Run container in the background, print new container name"
120
+ },
121
+ "no_deps": {
122
+ "type": "boolean",
123
+ "description": "Don't start linked services"
124
+ },
125
+ "env": {
126
+ "type": "object",
127
+ "additionalProperties": {
128
+ "type": "string"
129
+ },
130
+ "description": "Set environment variables"
131
+ },
132
+ "volumes": {
133
+ "type": "object",
134
+ "additionalProperties": {
135
+ "type": "string"
136
+ },
137
+ "description": "Bind mount volumes"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
@@ -0,0 +1,330 @@
1
+
2
+ # Run Schema
3
+
4
+ ```
5
+ https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json
6
+ ```
7
+
8
+ Run task to perform using either docker or docker-compose
9
+
10
+ | Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
11
+ |----------|------------|--------|--------------|-------------------|-----------------------|------------|
12
+ | Can be instantiated | Yes | Experimental | No | Forbidden | Permitted | [run.schema.json](run.schema.json) |
13
+
14
+ # Run Properties
15
+
16
+ | Property | Type | Required | Defined by |
17
+ |----------|------|----------|------------|
18
+ | [name](#name) | `string` | **Required** | Run (this schema) |
19
+ | `*` | any | Additional | this schema *allows* additional properties |
20
+
21
+ ## name
22
+
23
+ Unique name to identify the run task.
24
+
25
+ `name`
26
+
27
+ * is **required**
28
+ * type: `string`
29
+ * defined in this schema
30
+
31
+ ### name Type
32
+
33
+
34
+ `string`
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+ # Run Definitions
43
+
44
+ | Property | Type | Group |
45
+ |----------|------|-------|
46
+ | [cmd](#cmd) | `string` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
47
+ | [detach](#detach) | `boolean` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
48
+ | [env](#env) | `object` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
49
+ | [file](#file) | `string` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
50
+ | [image](#image) | `string` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_options` |
51
+ | [no_deps](#no_deps) | `boolean` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
52
+ | [rm](#rm) | `boolean` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
53
+ | [service](#service) | `string` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
54
+ | [service_ports](#service_ports) | `string` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
55
+ | [type](#type) | `enum` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
56
+ | [user](#user) | `string` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
57
+ | [volumes](#volumes) | `object` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
58
+ | [workdir](#workdir) | `string` | `https://raw.githubusercontent.com/bilby91/ddsl/master/docs/run.schema.json#/definitions/run_docker_compose_options` |
59
+
60
+ ## cmd
61
+
62
+ Command to run in the the container
63
+
64
+ `cmd`
65
+
66
+ * is optional
67
+ * type: `string`
68
+ * defined in this schema
69
+
70
+ ### cmd Type
71
+
72
+
73
+ `string`
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ ## detach
82
+
83
+ Detached mode: Run container in the background, print new container name
84
+
85
+ `detach`
86
+
87
+ * is optional
88
+ * type: `boolean`
89
+ * defined in this schema
90
+
91
+ ### detach Type
92
+
93
+
94
+ `boolean`
95
+
96
+
97
+
98
+
99
+
100
+ ## env
101
+
102
+ Set environment variables
103
+
104
+ `env`
105
+
106
+ * is optional
107
+ * type: `object`
108
+ * defined in this schema
109
+
110
+ ### env Type
111
+
112
+
113
+ `object` with following properties:
114
+
115
+
116
+ | Property | Type | Required |
117
+ |----------|------|----------|
118
+
119
+
120
+
121
+
122
+
123
+
124
+ ## file
125
+
126
+ Path to the docker-compose file
127
+
128
+ `file`
129
+
130
+ * is optional
131
+ * type: `string`
132
+ * defined in this schema
133
+
134
+ ### file Type
135
+
136
+
137
+ `string`
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ ## image
146
+
147
+ The image that the container will use
148
+
149
+ `image`
150
+
151
+ * is optional
152
+ * type: `string`
153
+ * defined in this schema
154
+
155
+ ### image Type
156
+
157
+
158
+ `string`
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ ## no_deps
167
+
168
+ Don't start linked services
169
+
170
+ `no_deps`
171
+
172
+ * is optional
173
+ * type: `boolean`
174
+ * defined in this schema
175
+
176
+ ### no_deps Type
177
+
178
+
179
+ `boolean`
180
+
181
+
182
+
183
+
184
+
185
+ ## rm
186
+
187
+ Remove container after run. Ignored in detached mode
188
+
189
+ `rm`
190
+
191
+ * is optional
192
+ * type: `boolean`
193
+ * defined in this schema
194
+
195
+ ### rm Type
196
+
197
+
198
+ `boolean`
199
+
200
+
201
+
202
+
203
+
204
+ ## service
205
+
206
+ Name of the docker-compose service to build
207
+
208
+ `service`
209
+
210
+ * is optional
211
+ * type: `string`
212
+ * defined in this schema
213
+
214
+ ### service Type
215
+
216
+
217
+ `string`
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ ## service_ports
226
+
227
+ Run command with the service's ports enabled and mapped to the host
228
+
229
+ `service_ports`
230
+
231
+ * is optional
232
+ * type: `string`
233
+ * defined in this schema
234
+
235
+ ### service_ports Type
236
+
237
+
238
+ `string`
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ ## type
247
+
248
+ Type of runner to use
249
+
250
+ `type`
251
+
252
+ * is optional
253
+ * type: `enum`
254
+ * defined in this schema
255
+
256
+ The value of this property **must** be equal to one of the [known values below](#type-known-values).
257
+
258
+ ### type Known Values
259
+ | Value | Description |
260
+ |-------|-------------|
261
+ | `docker-compose` | |
262
+
263
+
264
+
265
+
266
+ ## user
267
+
268
+ Run as specified username or uid
269
+
270
+ `user`
271
+
272
+ * is optional
273
+ * type: `string`
274
+ * defined in this schema
275
+
276
+ ### user Type
277
+
278
+
279
+ `string`
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+ ## volumes
288
+
289
+ Bind mount volumes
290
+
291
+ `volumes`
292
+
293
+ * is optional
294
+ * type: `object`
295
+ * defined in this schema
296
+
297
+ ### volumes Type
298
+
299
+
300
+ `object` with following properties:
301
+
302
+
303
+ | Property | Type | Required |
304
+ |----------|------|----------|
305
+
306
+
307
+
308
+
309
+
310
+
311
+ ## workdir
312
+
313
+ Working directory inside the container
314
+
315
+ `workdir`
316
+
317
+ * is optional
318
+ * type: `string`
319
+ * defined in this schema
320
+
321
+ ### workdir Type
322
+
323
+
324
+ `string`
325
+
326
+
327
+
328
+
329
+
330
+