Get artifacts with a custom property on its folder

293 Views Asked by At

In Artifactory, we have repositories (folders) containing artifacts. Sometimes, we want to remove artifacts older than XX days. We don't want to apply this rule on all our repos. So we added a custom property on the repositories we want to clean up.

This custom property does not apply to the artifacts underneath (actually it can be recursive, but they are not applied to new artifacts automatically, which make it useless for us).

With AQL, I wrote the following query but it returns the repositories with the custom property and not the artifacts underneath:

{
  "files": [
    {
      "aql": {
        "items.find": {
          "@mycustomproperty": {"$eq":"yes"},
          "type": {"$eq":"files"}
        }
      }
    }
  ]
}

How to get all artifacts with a parent repository having this custom property ?

Thank you for your help!

0

There are 0 best solutions below