Artifactory 如何使用aql和jfrog cli查找特定工件
我想找到所有包含特定模式的工件, 除了少数 MyArtifactory 如何使用aql和jfrog cli查找特定工件,artifactory,jfrog-cli,artifactory-query-lang,Artifactory,Jfrog Cli,Artifactory Query Lang,我想找到所有包含特定模式的工件, 除了少数 Myaql.json items.find({ "name":{"$match": "*test*"}, "name":{"$nmatch": "*test1*"}, "name":{"$nmatch": "*test2*"} }) { "files" : [ { "aql" : { "items.find" :{
aql.json
items.find({
"name":{"$match": "*test*"},
"name":{"$nmatch": "*test1*"},
"name":{"$nmatch": "*test2*"}
})
{
"files" : [
{
"aql" : {
"items.find" :{
"repo": "myRepo",
"path" : {"$match": "*/somedir/somedir*"},
"$and" :
[
{"name" : {"$match" : "*test*"}},
{"name" : {"$nmatch" : "*test1*"}},
{"name" : {"$nmatch" : "*test2*"}}
]
}
}
}
]
}
我得到了这个错误:
[Error] invalid character 'i' looking for beginning of value
我的jfrog cli命令:
jfrog rt s --spec=aql.json
(我总是在linux环境上使用管理员用户配置我的工件)
编辑aql.json
items.find({
"name":{"$match": "*test*"},
"name":{"$nmatch": "*test1*"},
"name":{"$nmatch": "*test2*"}
})
{
"files" : [
{
"aql" : {
"items.find" :{
"repo": "myRepo",
"path" : {"$match": "*/somedir/somedir*"},
"$and" :
[
{"name" : {"$match" : "*test*"}},
{"name" : {"$nmatch" : "*test1*"}},
{"name" : {"$nmatch" : "*test2*"}}
]
}
}
}
]
}
但是它没有找到我的工件(我有与此模式匹配的工件)
[Info] Found 0 artifacts.
[]
它希望得到一个JSON。
这一个对我有用:
{
"files": [
{
"aql": {
"items.find": {
"$and": [
{ "name": { "$match": "*test*" } },
{ "name": { "$nmatch": "*test_1*" } },
{ "name": { "$nmatch": "*test_2*" } }
]
}
}
}
]
}