Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to get the latest version of an RPM from an Artifactory Repository
echo 'items.find(
{
"repo":{"$eq":"<REPO_NAME>"},
"name":{"$match":"<RPM_NAME>*"}
}
).include("name", "@rpm.metadata.release").sort({"$desc" : ["name"]}).limit(1)' > aql.json
curl -X POST -Taql.json --user <USER>:<PASSWORD> "https://<ARTIFACTORY>/api/search/aql" | python -c "import json,sys;obj=json.load(sys.stdin);print obj['results'][0]['properties'][0]['value'];"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.