-
Notifications
You must be signed in to change notification settings - Fork 286
Expand file tree
/
Copy pathfilespec-schema.json
More file actions
260 lines (259 loc) · 9.42 KB
/
filespec-schema.json
File metadata and controls
260 lines (259 loc) · 9.42 KB
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
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "JFrog File Spec",
"description": "JFrog File Spec schema definition.",
"additionalProperties": false,
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/$file"
},
"description": "Details of files to be uploaded or downloaded from Artifactory.",
"minItems": 1,
"uniqueItems": true,
"default": [
{
"pattern": ""
}
]
},
"$schema": {
"type": "string",
"description": "The schema to verify this document against."
}
},
"$file": {
"additionalProperties": false,
"properties": {
"ant": {
"type": "string",
"enum": ["true", "false"],
"description": "If true, the command will interpret the patterns which describes the local file-system paths, as ANT patterns.",
"default": "false"
},
"aql": {
"description": "An AQL query that specified artifacts in Artifactory.",
"additionalProperties": false,
"properties": {
"items.find": {}
},
"default": {
"items.find": {
"repo": "my-local-repo",
"path": "my-path",
"file": "my-file"
}
}
},
"pathMapping": {
"description": "If specified, determines release-bundle source and target paths for artifacts that had been fetched using aql.",
"properties": {
"input": {
"type": "string",
"description": "The input path for mapping.",
"examples": ["(.*)/old_folder/(.*)"]
},
"output": {
"type": "string",
"description": "The output path for mapping.",
"examples": ["$1/new_folder/$2"]
}
}
},
"archive": {
"type": "string",
"enum": ["zip"],
"description": "Set to \"zip\" to pack and deploy the files to Artifactory inside a ZIP archive. Currently, the only packaging format supported is zip."
},
"archiveEntries": {
"type": "string",
"description": "If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts."
},
"build": {
"type": "string",
"description": "If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.",
"examples": ["buildName", "buildName/buildNumber"]
},
"bundle": {
"type": "string",
"description": "If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.",
"examples": ["buildName/bundleVersion"]
},
"excludeArtifacts": {
"type": "string",
"enum": ["true", "false"],
"description": "If specified, build artifacts are not matched.",
"default": "false"
},
"excludeProps": {
"type": "string",
"description": "List of \"key=value\" pairs separated by a semi-colon. Only artifacts without all of the specified properties names and values will be affected.",
"examples": ["key1=value1;key2=value2;key3=value3"]
},
"exclusions": {
"type": "array",
"description": "An array (enclosed with square brackets) of patterns to be excluded from uploading/downloading.",
"examples": [["*.sha1", "*.md5"]]
},
"explode": {
"type": "string",
"enum": ["true", "false"],
"description": "If true, archive file is extracted after the operation. The archived file itself is deleted. The supported archive types are: zip, tar; tar.gz; and tgz.",
"default": "false"
},
"bypass-archive-inspection": {
"type": "string",
"enum": ["true", "false"],
"description": "If true, bypass the security inspection the archive go through before it is unarchived.",
"default": "false"
},
"flat": {
"type": "string",
"enum": ["true", "false"],
"description": "If true, artifacts are uploaded/downloaded to the exact target path specified and their hierarchy in the source file system is ignored.",
"default": "true"
},
"includeDeps": {
"type": "string",
"enum": ["true", "false"],
"description": "If specified, also dependencies of the specified build are matched.",
"default": "true"
},
"includeDirs": {
"type": "string",
"enum": ["true", "false"],
"description": "If true, the source path applies to bottom-chain directories and not only to files. Bottom-chain directories are either empty or do not include other directories that match the source path.",
"default": "false"
},
"limit": {
"type": "integer",
"description": "The maximum number of items to fetch. Usually used with the sortBy option."
},
"offset": {
"type": "integer",
"description": "The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option."
},
"pattern": {
"type": "string",
"description": "Specifies a local file system path or a path in Artifactory."
},
"props": {
"type": "string",
"description": "List of \"key=value\" pairs separated by a semi-colon. Only artifacts with all of the specified properties names and values will be affected.",
"examples": ["key1=value1;key2=value2;key3=value3"]
},
"recursive": {
"type": "string",
"enum": ["true", "false"],
"description": "If true, files are also collected from sub-folders of the source directory.",
"default": "true"
},
"regexp": {
"type": "string",
"description": "If true, the command will interpret the patterns which describes the local file-system paths, as regular expressions.",
"default": "false"
},
"sortBy": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of fields to sort by. The fields must be part of the 'items' AQL domain.",
"examples": [
"repo",
"path",
"name",
"created",
"modified",
"updated",
"created_by",
"modified_by",
"type",
"depth",
"original_md5",
"actual_md5",
"original_sha1",
"actual_sha1",
"sha256",
"size",
"virtual_repos"
]
},
"sortOrder": {
"type": "string",
"enum": ["asc", "desc"],
"description": "The order by which fields in the sortBy option should be sorted.",
"default": "asc"
},
"symlinks": {
"type": "string",
"description": "If true, the command will preserve the soft links structure in Artifactory. The symlink file representation will contain the symbolic link and checksum properties.",
"default": "false"
},
"target": {
"type": "string",
"description": "Specifies a local file system path or a path in Artifactory.",
"default": "./"
},
"targetProps": {
"type": "string",
"description": "List of \"key=value\" pairs separated by a semi-colon. The specified properties will be attached to the affected artifacts.",
"examples": ["key1=value1;key2=value2;key3=value3"]
},
"validateSymlinks": {
"type": "string",
"description": "If true, the command will validate that symlinks are pointing to existing and unchanged files, by comparing their sha1. Applicable to files and not directories.",
"default": "false"
},
"include-dirs": {
"type": "string",
"enum": ["true", "false"],
"description": "Set to true if you'd like to also apply the source path pattern for directories and not just for files.",
"default": "false"
},
"from-rt": {
"type": "string",
"enum": ["true", "false"],
"description": "If true, search the files in Artifactory, rather than on the local file system. The --regexp option is not supported when --from-rt is set to true.",
"default": "false"
},
"gpg-key": {
"type": "string",
"description": "Path to the public GPG key file located on the file system, used to validate downloaded release bundles."
},
"project": {
"type": "string",
"description": "JFrog project key."
}
},
"anyOf": [
{ "required": ["pattern"] },
{ "required": ["aql"] },
{ "required": ["build"] },
{ "required": ["bundle"] }
],
"dependencies": {
"pattern": { "not": { "required": ["aql"] } },
"aql": {
"not": {
"required": [
"pattern",
"exclusions",
"props",
"targetProps",
"excludeProps",
"recursive",
"regexp",
"archiveEntries"
]
}
},
"pathMapping": { "required": ["aql"] },
"build": { "not": { "required": ["bundle", "limit", "offset"] } },
"bundle": { "not": { "required": ["build", "limit", "offset"] } },
"excludeArtifacts": { "required": ["build"] },
"includeDeps": { "required": ["build"] }
}
}
}