Jenkins-使用curl获得最新的工件 [英] Jenkins - get latest artifact with curl

查看:50
本文介绍了Jenkins-使用curl获得最新的工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在环顾四周,找不到如何使用curl下载最新的工件,甚至找不到链接.

I've been looking around and cannot find how to download the latest artifact with curl or even just to know the link.

我发现了包含所有所需数据(如工件名称等)的永久链接和api xml/json提要.还发现了压缩所有工件的特殊链接,但是我的工件已经被压缩了.

I've discovered the permalinks and api xml/json feeds which contain all the data that is needed such as the artifact names etc....Also discovered the special link that zips all artifacts, but my artifact is already zipped.

是否有一种方法不必选择信息,而只需使用简单的链接.换句话说,告诉詹金斯给我工作x的最新工件,而无需指定文件名等...,例如:

Is there is a way to not have to pick out information and just use a simple link. In other words, tell jenkins to give me the latest artifact of job x without specifying filenames etc... such as:

jenkins服务器:8080/job/job_name/lastbuild/artifactdownload

jenkinsserver:8080/job/job_name/lastbuild/artifactdownload

任何帮助将不胜感激.谢谢

Any help would be appreciated. Thank-you

应该提到工件的名称包含版本号,例如:artifact.xx.xx.xx.zip

Should have mentioned that the name of the artifact contains the version number, such as: artifact.xx.xx.xx.zip

推荐答案

是的,有实现此目的的选项:

Yes, there is an option to achieve this:

https://jenkinsserver.com/job/<job-name>/lastSuccessfulBuild/artifact/<Artifact-Name>

这篇关于Jenkins-使用curl获得最新的工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆