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

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

问题描述

似乎只能使用以下方式通过 FTP 上传文件:

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

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

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

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

curl 工具几乎适用于任何操作系统.

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

如果您只需要通过 FTP 下载一个文件而不需要签出任何其他文件,您还可以使用 URL SCM 插件.

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.

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

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