Problem:
I'm trying to figure out if it is possible to download the latest binary from an artifactory repo. I'd like to use the Created property of the file if possible.
Attempt:
I can successfully download files via the rtDownload plugin
rtDownload (
serverId: 'Artifactory-1',
// Build name and build number for the build-info:
buildName: 'holyFrog',
buildNumber: '42',
// You also have the option of customising the build-info module name:
module: 'my-custom-build-info-module-name',
specPath: 'path/to/spec/relative/to/workspace/spec.json'
)
I would like to see if I can use a combination of limit and sortOrder to download the latest binary from a repo. It's not clear to me as to how I can achieve that based on the documentation: https://www.jfrog.com/confluence/display/JFROG/Using+File+Specs. Any help would be greatly appreciated!
Update: I can't use the build-name like this: Jenkins Artifactory plugin - grabbing latest artifacts
I found out that the cli supports "sortBy": ["created"], but the pipeline doesn't: https://www.jfrog.com/jira/browse/HAP-1215. Anyone find a workaround for this?