'How to use artifactory query language inside a jenkins pipeline instead of having it call from a file
I have a AQL that is used to delete files from the artifactory. I am designing a pipeline so that it can delete files from artifactory based on the AQL. I know for artifactory upload and download we can specify the AQL within the pipeline using rtupload/rtdownload, but is there a way to do for delete as well?
#AQL delete.spec
{
"files": [
{
"aql": {
"items.find": {
"repo": {"$eq":"app-java-repo"},
"path": "archives/test/app",
"type": "folder",
"$or": [
{
"$and": [
{
"name": {"$nmatch" : "*build*"}
}
]
}
]
}
}
}
]
}
jf rt del --spec delete.spec
Using the jfrog cli, the spec file can be passed and the files from artifactory repo can be deleted. This is working out manually, but how can the same be achieved by having the AQL in the pipeline stage instead of having AQL as a file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
