forked from cdklabs/cloud-assembly-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassets.schema.json
263 lines (263 loc) · 11.9 KB
/
assets.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
{
"$ref": "#/definitions/AssetManifest",
"definitions": {
"AssetManifest": {
"description": "Definitions for the asset manifest",
"type": "object",
"properties": {
"version": {
"description": "Version of the manifest",
"type": "string"
},
"files": {
"description": "The file assets in this manifest (Default - No files)",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/FileAsset"
}
},
"dockerImages": {
"description": "The Docker image assets in this manifest (Default - No Docker images)",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/DockerImageAsset"
}
}
},
"required": [
"version"
]
},
"FileAsset": {
"description": "A file asset",
"type": "object",
"properties": {
"source": {
"$ref": "#/definitions/FileSource",
"description": "Source description for file assets"
},
"destinations": {
"description": "Destinations for this file asset",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/FileDestination"
}
}
},
"required": [
"destinations",
"source"
]
},
"FileSource": {
"description": "Describe the source of a file asset",
"type": "object",
"properties": {
"executable": {
"description": "External command which will produce the file asset to upload. (Default - Exactly one of `executable` and `path` is required.)",
"type": "array",
"items": {
"type": "string"
}
},
"path": {
"description": "The filesystem object to upload\n\nThis path is relative to the asset manifest location. (Default - Exactly one of `executable` and `path` is required.)",
"type": "string"
},
"packaging": {
"description": "Packaging method\n\nOnly allowed when `path` is specified. (Default FILE)",
"enum": [
"file",
"zip"
],
"type": "string"
}
}
},
"FileDestination": {
"description": "Where in S3 a file asset needs to be published",
"type": "object",
"properties": {
"bucketName": {
"description": "The name of the bucket",
"type": "string"
},
"objectKey": {
"description": "The destination object key",
"type": "string"
},
"region": {
"description": "The region where this asset will need to be published (Default - Current region)",
"type": "string"
},
"assumeRoleArn": {
"description": "The role that needs to be assumed while publishing this asset (Default - No role will be assumed)",
"type": "string"
},
"assumeRoleExternalId": {
"description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)",
"type": "string"
},
"assumeRoleAdditionalOptions": {
"description": "Additional options to pass to STS when assuming the role.\n\n- `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. (Default - No additional options.)",
"type": "object",
"additionalProperties": {}
}
},
"required": [
"bucketName",
"objectKey"
]
},
"DockerImageAsset": {
"description": "A file asset",
"type": "object",
"properties": {
"source": {
"$ref": "#/definitions/DockerImageSource",
"description": "Source description for file assets"
},
"destinations": {
"description": "Destinations for this file asset",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/DockerImageDestination"
}
}
},
"required": [
"destinations",
"source"
]
},
"DockerImageSource": {
"description": "Properties for how to produce a Docker image from a source",
"type": "object",
"properties": {
"directory": {
"description": "The directory containing the Docker image build instructions.\n\nThis path is relative to the asset manifest location. (Default - Exactly one of `directory` and `executable` is required)",
"type": "string"
},
"executable": {
"description": "A command-line executable that returns the name of a local\nDocker image on stdout after being run. (Default - Exactly one of `directory` and `executable` is required)",
"type": "array",
"items": {
"type": "string"
}
},
"dockerFile": {
"description": "The name of the file with build instructions\n\nOnly allowed when `directory` is set. (Default Dockerfile)",
"type": "string"
},
"dockerBuildTarget": {
"description": "Target build stage in a Dockerfile with multiple build stages\n\nOnly allowed when `directory` is set. (Default - The last stage in the Dockerfile)",
"type": "string"
},
"dockerBuildArgs": {
"description": "Additional build arguments\n\nOnly allowed when `directory` is set. (Default - No additional build arguments)",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"dockerBuildSsh": {
"description": "SSH agent socket or keys\n\nRequires building with docker buildkit. (Default - No ssh flag is set)",
"type": "string"
},
"dockerBuildSecrets": {
"description": "Additional build secrets\n\nOnly allowed when `directory` is set. (Default - No additional build secrets)",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"networkMode": {
"description": "Networking mode for the RUN commands during build. _Requires Docker Engine API v1.25+_.\n\nSpecify this property to build images on a specific networking mode. (Default - no networking mode specified)",
"type": "string"
},
"platform": {
"description": "Platform to build for. _Requires Docker Buildx_.\n\nSpecify this property to build images on a specific platform/architecture. (Default - current machine platform)",
"type": "string"
},
"dockerOutputs": {
"description": "Outputs (Default - no outputs are passed to the build command (default outputs are used))",
"type": "array",
"items": {
"type": "string"
}
},
"cacheFrom": {
"description": "Cache from options to pass to the `docker build` command. (Default - no cache from options are passed to the build command)",
"type": "array",
"items": {
"$ref": "#/definitions/DockerCacheOption"
}
},
"cacheTo": {
"description": "Cache to options to pass to the `docker build` command. (Default - no cache to options are passed to the build command)",
"$ref": "#/definitions/DockerCacheOption"
},
"cacheDisabled": {
"description": "Disable the cache and pass `--no-cache` to the `docker build` command. (Default - cache is used)",
"type": "boolean"
}
}
},
"DockerCacheOption": {
"description": "Options for configuring the Docker cache backend",
"type": "object",
"properties": {
"type": {
"description": "The type of cache to use.\nRefer to https://docs.docker.com/build/cache/backends/ for full list of backends. (Default - unspecified)",
"type": "string"
},
"params": {
"description": "Any parameters to pass into the docker cache backend configuration.\nRefer to https://docs.docker.com/build/cache/backends/ for cache backend configuration. (Default {} No options provided)",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"type"
]
},
"DockerImageDestination": {
"description": "Where to publish docker images",
"type": "object",
"properties": {
"repositoryName": {
"description": "Name of the ECR repository to publish to",
"type": "string"
},
"imageTag": {
"description": "Tag of the image to publish",
"type": "string"
},
"region": {
"description": "The region where this asset will need to be published (Default - Current region)",
"type": "string"
},
"assumeRoleArn": {
"description": "The role that needs to be assumed while publishing this asset (Default - No role will be assumed)",
"type": "string"
},
"assumeRoleExternalId": {
"description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)",
"type": "string"
},
"assumeRoleAdditionalOptions": {
"description": "Additional options to pass to STS when assuming the role.\n\n- `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. (Default - No additional options.)",
"type": "object",
"additionalProperties": {}
}
},
"required": [
"imageTag",
"repositoryName"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}