在jenkins工作中通过FTP下载文件? [英] Download files over FTP in a jenkins job?

查看:1104
本文介绍了在jenkins工作中通过FTP下载文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎它只能通过FTP上传文件:

https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+FTP+Plugin



但是我需要通过FTP下载一个文件,我可以为此编写一个groovy插件,但似乎很奇怪,没有插件用于这个

解决方案

也许原因在于使用像下面这样的单行程序在构建过程中下载文件有点微不足道:

 curl -O ftp:// server / path / to / file 

curl工具适用于任何操作系统。



如果您只需要通过FTP下载一个文件并且不需要检出任何其他文件,您也可以使用 URL SCM插件


It seems that its only possible to upload files over FTP using:

https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+FTP+Plugin

But I need to download a file over FTP, I could write a groovy plugin for this but it seems strange that there is no plugin for this

解决方案

Maybe the reason is that it is somewhat trivial to download a file during a build using a one-liner like:

curl -O ftp://server/path/to/file

The curl tool is available for just about any operating system.

If you only need to download one file over FTP and do not need to check out any other files, you could also use the URL SCM plugin.

这篇关于在jenkins工作中通过FTP下载文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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