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,44 @@
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
+
26
+ ],
27
+ "description": "List of registries to authenticate when performing either a build or run operation"
28
+ },
29
+ "builds": {
30
+ "type": "array",
31
+ "items": {
32
+ "$ref": "https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/build.schema.json"
33
+ },
34
+ "description": "List of build tasks to run"
35
+ },
36
+ "runs": {
37
+ "type": "array",
38
+ "items": {
39
+ "$ref": "https://raw.githubusercontent.com/bilby91/ddsl/testing/docs/run.schema.json"
40
+ },
41
+ "description": "List of run tasks to run"
42
+ }
43
+ }
44
+ }
@@ -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,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": "array",
68
+ "items": {
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": "array",
134
+ "items": {
135
+ "type": "string"
136
+ },
137
+ "description": "Bind mount volumes"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fernandez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2018-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2'
41
41
  - !ruby/object:Gem::Dependency
42
- name: json-schema
42
+ name: json_schemer
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2'
47
+ version: '0.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2'
54
+ version: '0.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: transproc
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -132,12 +132,21 @@ files:
132
132
  - docker/Dockerfile
133
133
  - docker/Dockerfile.dev
134
134
  - docker/docker-compose.yml
135
+ - docs/build.schema.json
136
+ - docs/build.schema.md
137
+ - docs/ddsl.schema.json
138
+ - docs/ddsl.schema.md
139
+ - docs/registry.schema.json
140
+ - docs/registry.schema.md
141
+ - docs/run.schema.json
142
+ - docs/run.schema.md
135
143
  - lib/ddsl.rb
136
144
  - lib/ddsl/cli.rb
137
145
  - lib/ddsl/command.rb
138
146
  - lib/ddsl/command/base.rb
139
147
  - lib/ddsl/command/docker/build.rb
140
148
  - lib/ddsl/command/docker/login.rb
149
+ - lib/ddsl/command/docker/pull.rb
141
150
  - lib/ddsl/command/docker/push.rb
142
151
  - lib/ddsl/command/docker/run.rb
143
152
  - lib/ddsl/command/docker_compose/build.rb
@@ -150,6 +159,10 @@ files:
150
159
  - lib/ddsl/shell.rb
151
160
  - lib/ddsl/variable_injector.rb
152
161
  - lib/ddsl/version.rb
162
+ - schemas/build.schema.json
163
+ - schemas/ddsl.schema.json
164
+ - schemas/registry.schema.json
165
+ - schemas/run.schema.json
153
166
  homepage: https://github.com/bilby91/ddsl
154
167
  licenses:
155
168
  - MIT