Download files over FTP in a jenkins job?

2019-02-23 18:06发布

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

标签: jenkins ftp
2条回答
贪生不怕死
2楼-- · 2019-02-23 18:49

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.

查看更多
Explosion°爆炸
3楼-- · 2019-02-23 19:00

There is now an SSH2Easy plugin available that supports sftp to/from remote systems. My company has moved to requiring use of sftp and won't allow ftp any longer.

This plugin, at the time of this reply, still needs some polishing, but it does work.

查看更多
登录 后发表回答