Skip to end of metadata
Go to start of metadata

Plugin Information

View FTP publisher on the plugin site for more information.

This plugin can be used to upload project artifacts and whole directories to an ftp server. The following image show the configuration part of this plugin that can be found under

the Jenkins System Configuration page. The fields are self explanatory with a little help text.


  After you define one or more ftp servers, configure your jobs to define what should be uploaded. See the image below for an example.
First you choose the target ftp server - in this example "URZ Deployments". So after that you specify the files and or folder to upload you are free to define an absolute path or a

fileset pattern (like in ant http://ant.apache.org/). So I guess with this information you can use this plugin very well and don't forget I developed this in my spare time so some feature are still

missing and maybe some bugs are living. Thankful to anybody how support jenkins and this plugin. See the comments for information about some current bugs.

11 Comments

  1. Since this plugin was damn slow and somehow confused the paths starting with the second upload, I wrote a batch script for uploading my artifacts via FTP:

    The batch job:
    echo Uploading artifacts
    rem use script and don't use automatic login
    ftp -s:"C:\path_to_my_ftp_script.txt" -n

    The ftp upload scrip (C:\path_to_my_ftp_script.txt)t:
    open 1.23.45.21 2122#
    user myusername
    mypassword
    bin
    cd artifact_dir_on_target_ftp_server
    put C:\artifactfile.zip
    bye

    I hope you like it.

  2. Unknown User (benjamin.jaton@gmail.com)

    I just released an new version for this plugin. It fixes most of the bugs and adds directory support. Also you can specify if you need the path to use a timestamp or to flatten the remote paths.

    The new version is 1.0 and is NOT backward compatible so please take some time to fix your plugin/jobs configuration.

    Have fun !

  3. Hey, just installed 1.0 and it probably works great when using standard FTP transfer (ports 21 and 20) but I probably have port 20 blocked so I get 0 byte sized uploaded files (without an error, though).

    Could you possibly implement an option for PASV transfers?

    Console log is as follows:

    Connecting to crm-test file:/usr/local/hudson/.hudson/jobs/crm-commons/workspace/
    current root dir /jboss423
    current root dir /jboss423/deploy/common
    transferred 1 files to deploy/common
    Transfered 1 files
    Finished: SUCCESS

  4. The help description of some fields should be more elaborated. Like:

    • Destination: What if it's empty? Does it take the same as the source?
    • Timestamp: What is it doing? Copy timestamp from source folder to keep the same timestamp? Only copy files newer, or may files with a different date time?
  5. Unknown User (george@weboart.com)

    I am having an issue where if I save two different FTP servers, the individual jobs default to the first FTP server I entered. Any help or tips? Thanks!

  6. What I would really like is the ability to upload to multiple FTP sites from the same job rather than just picking one per job.

  7. Switching to passive mode is easy if you're adventurous enough (plugin recompile). I have only one FTP server so I skipped the part of adding a parameter to the FTP site and just went and edited the createSession method on FTPSite object:

    Index: src/main/java/com/zanox/hudson/plugins/FTPSite.java
    ===================================================================
    --- src/main/java/com/zanox/hudson/plugins/FTPSite.java	(revision 37130)
    +++ src/main/java/com/zanox/hudson/plugins/FTPSite.java	(working copy)
    @@ -264,6 +264,7 @@
     		if (!ftpClient.changeWorkingDirectory(ftpDir)) {
     			throw new IOException("Can't connect/access FTP directory:" + ftpDir);
     		}
    +		ftpClient.enterLocalPassiveMode();
     	}
     
     	/**
    
  8. Unknown User (ivan.najman@gmail.com)

    This error is what i get when trying to upload files to FTP server

    ERROR: Failed to upload files
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:478)
    at java.net.Socket.<init>(Socket.java:375)
    at java.net.Socket.<init>(Socket.java:189)
    at org.apache.commons.net.DefaultSocketFactory.createSocket(DefaultSocketFactory.java:53)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:162)
    at com.zanox.hudson.plugins.FTPSite.createSession(FTPSite.java:260)
    at com.zanox.hudson.plugins.FTPPublisher.perform(FTPPublisher.java:149)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:560)
    at hudson.model.Build$RunnerImpl.post2(Build.java:156)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
    at hudson.model.Run.run(Run.java:1349)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:139)
    ERROR: Publisher com.zanox.hudson.plugins.FTPPublisher aborted due to exception
    java.lang.NullPointerException
    at org.apache.commons.net.telnet.TelnetClient.disconnect(TelnetClient.java:125)
    at org.apache.commons.net.ftp.FTP.disconnect(FTP.java:397)
    at org.apache.commons.net.ftp.FTPClient.disconnect(FTPClient.java:590)
    at com.zanox.hudson.plugins.FTPSite.closeSession(FTPSite.java:275)
    at com.zanox.hudson.plugins.FTPPublisher.perform(FTPPublisher.java:165)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:603)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:560)
    at hudson.model.Build$RunnerImpl.post2(Build.java:156)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:529)
    at hudson.model.Run.run(Run.java:1349)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:139)
    Finished: FAILURE

  9. Can any body confirm this bug: JENKINS-15222.

    Seem FTP Publischer post build step tries to synchronize all concurrent builds before it does anything - which results in workspace contents getting overwritten and wrong data beeing uploaded.

  10. I hate to pick nits, but "transferred" is spelled with 2 R's... (smile)