问题描述
我想问,如果我使用詹金斯.如何获取所有工件列表并下载它,而不是从jenkins Web界面下载.我想为某些目标创建自己的Web界面.
I want to ask, If I use jenkins. How can I get all artifacts list and download it, but not from jenkins web interface. I want to make my own web interface for certain goals.
是否有jenkins API可以做到这一点?
Is there any jenkins API to do this?
推荐答案
根据此答案: https://superuser.com/questions/587426/download-最新的稳定詹金斯生成文件
您可以使用Jenkins API获取工件列表:http:// your.jenkins.server /job/ your.job /lastStableBuild/api/xml? tree = artifacts%5BrelativePath%5D
You can use the Jenkins API to get the list of artifacts:http://your.jenkins.server/job/your.job/lastStableBuild/api/xml?tree=artifacts%5BrelativePath%5D
使用脚本,您可以提取伪像的相对路径:
With a script, you can extract the artefact relative path:
接下来,您可以构建您的下载URL,例如:http:// your.jenkins.server /job/ your.job /lastStableBuild/artifact/ relativePath
Next, you can build your download URLs like:http://your.jenkins.server/job/your.job/lastStableBuild/artifact/relativePath
这篇关于是否有任何Jenkins API可以获取工件名称并下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!