添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
强悍的斑马  ·  Building OpenSSL ...·  12 小时前    · 
儒雅的火腿肠  ·  Git stderr: Host key ...·  19 小时前    · 
开朗的枇杷  ·  build/jenkins/pipeline ...·  4 天前    · 
粗眉毛的高山  ·  Docker - 日拱一卒·  1 周前    · 
独立的钱包  ·  DX11 feature level ...·  1 周前    · 
谦和的火柴  ·  Terminal Shell ...·  1 月前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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?

After some source diving, I found the FileSpec class which each element in the spec is mapped to. Based on this, the sortBy, sortOrder, and limit fields should be part of the file object, not the aql object. For example:

"files": [ "aql": { "repo": "my-repo", "path": "my/artifacts/path" "sortBy": ["created", "name"], "sortOrder": "desc", "limit": 1, "target": "artifacts" Updated new plugin allows you to use such filters with patterns such as "pattern": "my_artifact_dir/*", "target": "./", "sortBy": ["created", "name"], "sortOrder": "desc", "limit": 1 c24b Aug 7 at 13:51

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .