Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download files over FTP in a jenkins job?

Tags:

jenkins

ftp

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

like image 316
u123 Avatar asked Jun 30 '14 07:06

u123


People also ask

How do I download files from an FTP site?

To download a file, drag the file from the browser window to the desktop. You can also double-click the filename, and you will be prompted to either save or open the file. To upload a file, drag the file from your hard drive to the browser window.

How do I publish using FTP in Jenkins?

Configure a job to Publish Over FTP Open a jobs main page and then click "Configure" from the left hand menu. Find the "Send build artifacts over FTP" checkbox in the "Post-build Actions" section (as below) and click in the box.


2 Answers

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.

like image 189
sti Avatar answered Oct 07 '22 16:10

sti


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.

like image 39
John Czukkermann Avatar answered Oct 07 '22 15:10

John Czukkermann