Example 1: Download all files located under the all-my-frogs directory in the my-local-repo repository to the froggy/all-my-frogs directory.
{
"files": [
{
"pattern": "my-local-repo/all-my-frogs/",
"target": "froggy/"
}
]
}
Example 2: Download all files retrieved by the AQL query to the local/output directory.
{
"files": [
{
"aql": {
"items.find": {
"repo": "my-local-repo",
"$or": [
{
"$and": [
{
"path": {
"$match": "."
},
"name": {
"$match": "a1.in"
}
}
]
},
{
"$and": [
{
"path": {
"$match": "*"
},
"name": {
"$match": "a1.in"
}
}
]
}
]
}
},
"target": "local/output/"
}
]
}
Example 3: Upload
All zip files located under the
resourcesdirectory to thezipfolder, under the all-my-frogs repository.AND
All TGZ files located under the
resourcesdirectory to the tgz folder, under the all-my-frogs repository.Tag all zip files with type = zip and status = ready.
Tag all tgz files with type = tgz and status = ready.
{
"files": [
{
"pattern": "resources/*.zip",
"target": "my-repo/zip/",
"props": "type=zip;status=ready"
},
{
"pattern": "resources/*.tgz",
"target": "my-repo/tgz/",
"props": "type=tgz;status=ready"
}
]
}
Example 4: Download all files located under the all-my-frogs directory in the my-local-repo repository except for the '.zip' files and the 'props.' files
{
"files": [
{
"pattern": "my-local-repo/all-my-frogs/",
"excludePatterns": [
"*.zip",
"all-my-frogs/props.*"
]
}
]
}Example 5: Download the three oldest zip files from the my-local-repo repository, into local/output directory.
{
"files": [
{
"pattern": "my-local-repo/*.zip",
"sortBy": ["created"],
"limit": 3,
"target": "local/output/"
}
]
}Example 6: Download the three oldest zip files from the my-local-repo repository, into local/output directory. This File Spec uses AQL.
{
"files": [
{
"aql": {
"items.find": {
"repo": "my-local-repo",
"$or": [
{
"$and": [
{
"path": {
"$match": "*"
},
"name": {
"$match": "*.zip"
}
}
]
}
]
}
},
"sortBy": ["created"],
"limit": 3,
"target": "local/output/"
}
]
}Example 7: Download the artifacts from the generic-local repository, which belong to the following build, which had been published to Artifactory - Build name: my-build and build number: 10.
{
"files": [
{
"pattern": "generic-local",
"build": "my-build/10"
}
]
}Example 8: Download the artifacts from the generic-local repository, which belong to the my-build build, which had been published to Artifactory. The artifacts of the latest build number published to Artifactory will be downloaded.
{
"files": [
{
"pattern": "generic-local",
"build": "my-build"
}
]
}