/
exec.json
201 lines (201 loc) · 5.56 KB
/
exec.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"installStep": {
"type": "object",
"properties": {
"exec": {"$ref": "#/definitions/exec"}
},
"additionalProperties": false,
"required": [
"exec"
]
},
"upgradeStep": {
"type": "object",
"properties": {
"exec": {"$ref": "#/definitions/exec"}
},
"additionalProperties": false,
"required": [
"exec"
]
},
"invokeStep": {
"type": "object",
"properties": {
"exec": {"$ref": "#/definitions/exec"}
},
"additionalProperties": false,
"required": [
"exec"
]
},
"uninstallStep": {
"type": "object",
"properties": {
"exec": {"$ref": "#/definitions/exec"}
},
"additionalProperties": false,
"required": [
"exec"
]
},
"exec": {
"description": "A step that is executed by the exec mixin",
"type": "object",
"properties": {
"description": {
"description": "A description of the mixin step",
"type": "string"
},
"command": {
"description": "The name of the command to run",
"type": "string"
},
"dir": {
"description": "The directory in which to execute the command",
"type": "string"
},
"arguments": {
"description": "Positional arguments to pass to the command before any flags",
"type": "array",
"items": {
"type": "string",
"minItems": 1
}
},
"flags": {
"description": "Flags to pass to the command",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"envs": {
"description": "Environment variables to add to the env of the command",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"suffix-arguments": {
"description": "Positional arguments to pass to the command after any flags",
"type": "array",
"items": {
"type": "string",
"minItems": 1
}
},
"suppress-output": {
"description": "Do not print output from the command",
"type": "boolean"
},
"outputs": {
"description": "List of outputs to capture from the command output",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The output name",
"type": "string"
},
"jsonPath": {
"description": "A json path expression that should be executed against the command's stdout to use as the output value",
"type": "string"
},
"regex": {
"description": "A regular expression that should be executed against the command's stdout to use as the output value",
"type": "string"
},
"path": {
"description": "A path to a file that was generated by the command to use as the output value",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name"
],
"oneOf": [
{ "required": [ "jsonPath" ] },
{ "required": [ "regex" ] },
{ "required": [ "path" ] }
]
}
},
"ignoreError": {
"description": "Ignore the command's errors under certain conditions",
"type": "object",
"properties": {
"all": {
"description": "Ignore all errors",
"type": "boolean"
},
"exitCodes": {
"description": "Ignore errors when one of the following exit codes are returned",
"type": "array",
"items": {
"type": "integer"
}
},
"output": {
"description": "Ignore errors when the command's stderr meets certain conditions",
"type": "object",
"properties": {
"contains": {
"description": "Ignore errors when stderr contains any of the following strings",
"type": "array",
"items": {
"type": "string"
}
},
"regex": {
"description": "Ignore errors when stderr matches any of the following regular expressions",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"command"
]
}
},
"type": "object",
"properties": {
"install": {
"type": "array",
"items": {
"$ref": "#/definitions/installStep"
}
},
"upgrade": {
"type": "array",
"items": {
"$ref": "#/definitions/upgradeStep"
}
},
"uninstall": {
"type": "array",
"items": {
"$ref": "#/definitions/uninstallStep"
}
}
},
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/invokeStep"
}
}
}