Jfrog aql语言规范文件中如何定义多个路径?

How can we define path more than one in Jfrog aql language spec file?

在定义的规范文件下方,我想在“路径”中添加更多值:{$match}函数。我的意思是我需要在这种语法中定义多个路径,这可能吗?即:Test/dev、Test/qa、Test/prod等。

  "files": [
    {
      "aql": {
        "items.find": {
          "repo": "Testing",
          "path": {"$match":"Test/dev"},
          "name": {"$match":"*"},
          "type": "file",
          "$or": [
            {
              "$and": [
                {
                  "created": { "$before":"90d" }
                }
              ]
            }
          ]
        }
      }
    }
  ]
}

您可以将它们添加到“或”子句中:

{
  "files": [
    {
      "aql": {
        "items.find": {
          "repo": "Testing",
          "name": { "$match": "*" },
          "type": "file",
          "created": { "$before": "90d" },
          "$or": [{ "$match": "Test/dev" }, { "$match": "Test/qa" }]
        }
      }
    }
  ]
}

阅读更多:

  1. AQL documentation
  2. Using File Specs