jfrog / artifactory-scripts

Scripts for Artifactory (Usually, for REST API), community driven.
Apache License 2.0
148 stars 166 forks source link

AQL query pattern for Docker images #12

Closed Giriraj24 closed 5 years ago

Giriraj24 commented 8 years ago

Hi Shay,

I hope you are doing great.

I wanted to use your following script in my Artifactory system for cleaning up the docker images.

https://github.com/JFrogDev/artifactory-scripts/blob/master/cleanup/aqlCleanup.groovy

Basically I wanted to retain only last 3 Docker images and delete rest of those.

However I am not able to find what pattern to use for Dockerimages, specifically in this line from your code:

def query = 'items.find({"type":"file","name":{"$match":"*.jar"}})' // replace this with your AQL query

Anything else you can suggest regarding cleaning up Dockerimages will be really helpful.

Thanks, Giriraj

Giriraj24 commented 8 years ago

@shaybagants

asilvis commented 8 years ago

I have the same situation here, as I see artifactory API and the UI does not provide a way to search docker repositories.

I'm unable to query my docker-local repo, it does not exist for API.

Any news?

DarthFennec commented 5 years ago

aqlCleanup.groovy is deprecated. Closing this as no longer relevant.