SCP plugin

Plugin Information

Plugin ID scp
Latest Release 1.5.2
Latest Release Date Nov 12, 2008
Changes in Latest Release via Fisheye
Maintainer(s) n/a (java.net id: Ramil)
Issue Tracking Open Issues


This plugin allows you upload some build artifacts to the repository sites using SFTP (SSH) protocol. First you should define SCP hosts on hudson global config page. After that you can refer to this hosts using select list. See picture for global config:


After entering username/password automatic logon check is performed to see if you entered it correctly.
Root repository path must exist before you can reference it and should be accessible by user who do publish of files.


Then per job you can enable publishing of build artifacts:

source points to files which will be uploaded. You can use ant includes syntax, eg. folder/dist/*.jar. Path is constructed from workspace root.
  Note that you cannot point files outside the workspace directory. For example providing: ../myfile.txt won't work...
destination points to destination folder on remote site. It will be created if doesn't exists and relative to root repository path.
You can define multiple blocks of source/destination pairs.

Changelog

Version 1.5.2
  • Fix for issue #2609 : version 1.5.1 of the SCP plugin is broken for "password only"
    authentication
Version 1.5.1
  • Enhancement , support for public key authentication (issue #1269)
  • Enhancement, works now with Maven2 jobs (issue 1845)
Upcoming Version 1.5
  • Improved error diagnosis when the specified file pattern didn't match anything.
Version 1.4 (2008/07/23)
Version 1.3
  • fixed bug with subdirectories creation
Version 1.2

Labels:

plugin-publisher plugin-publisher Delete
plugin-upload plugin-upload Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Feb 15, 2008

    Anonymous says:

    Can you access other job's lastSuccessful?  I want to create a new schedule...

    Can you access other job's lastSuccessful?  I want to create a new scheduled job that grabs the last successful build artifact of a particular job.  Is this possible?

    1. Apr 24, 2008

      Bartek Zdanowski says:

      Nope, you cannot. I spent some time debbuging SCP Plugin. You cannot access file...

      Nope, you cannot. I spent some time debbuging SCP Plugin. You cannot access files outside workspace. I need version that allows it and maybe I'll fix it and put new plugin somewhere. Or Ramil will do it?

  2. Jun 24, 2008

    Trond Andersen says:

    Does this plugin work on Windows with Cygwin installed? If so - this should prob...

    Does this plugin work on Windows with Cygwin installed? If so - this should probably be mentioned on this Confluence page.

  3. Aug 22, 2008

    Luke Alford says:

    If you only have a single artifact you want to copy somewhere, are there any tho...

    If you only have a single artifact you want to copy somewhere, are there any thoughts to adding the ability to rename said artifact?  Near as I can tell, the destination only allows a relative directory path and there's no way to include a new file name.  This would be a very useful feature to me since I am using this tool to copy an artifact that has a version number in the file name (for QA and production) as well as for my development automated testing tool that would like to be version agnostic (so I don't have to change the automated tester every time the artifact version changes).

    I'm thinking something like the following, but I haven't grabbed the source yet to find out what might be involved in doing this.

    artifact name = product-1.0.ear

    source: workspace/build/artifacts/*

    destination: qa/product/1.0/product-1.0.ear

    destination: dev/product/trunk/product-trunk.ear

    (where product-*.ear is the file name, not a folder)

  4. Sep 02, 2008

    Hakan ERDOĞAN says:

    This plugin is very useful, it runs on a free-style software project but fails o...

    This plugin is very useful, it runs on a free-style software project but fails on a maven project.

    Actually it never tries to run on a maven project, no log, no process.

    Is there a solution for this?

  5. Jan 05, 2009

    Peter Kahn says:

    The add files option doesn't seem to provide fields for me to enter data.  ...

    The add files option doesn't seem to provide fields for me to enter data.  I have tried this on Firfox/IE and Chrome.  Is there example xml for the config.xml so I can sneak passed this?

    1. Jan 05, 2009

      Peter Kahn says:

      Never mind, it was a configuration problem.  I installed the latest plugin ...

      Never mind, it was a configuration problem.  I installed the latest plugin prior to upgrading hudson.  This made hudson incapable of editing the build configuration at all. All was fine after doing this:

      • upgrade hudson
      • disabled and re-enable plugin
  6. Jun 20

    Reiner Saddey says:

    I'm impressed, it's working like a charm! Still, I'd like to propose an enhancem...

    I'm impressed, it's working like a charm! Still, I'd like to propose an enhancement:

    I'd wish for an additional id field, so multiple destinations (i.e. repository paths and logins) can be set-up for the same host.

    Right now, the hostname field serves two purposes:
    1. Designate the FQDN (DSN-name or IP) of the target-host
    2. State the name for a set of repository settings (i.e. port, repository path, user, password, etc.)

    I have to admit that I don't use the SCP plugin to copy to a repository at all. Instead build artifacts are being copied to (Apache-) www-folders so they can then be downloaded and installed (.jads and .jars in my case). That's fine for a single target (i.e. repository), but appears to fail if there are numerous target directories (and each of them requiring a different login).

    Should I a dare to open an enhancement issue?

  7. Jun 24

    Sterling Heibeck says:

    I've got everything working brilliantly with this plugin except that it won't cr...

    I've got everything working brilliantly with this plugin except that it won't create subdirectories in the Source root Has anyone found a solution to this?

  8. Jul 21

    Dan Morrow says:

    I'm trying to recursively copy over a directory from one location to another usi...

    I'm trying to recursively copy over a directory from one location to another using the SCP plugin, and can't figure out how to do it with the Ant glob syntax.

    Previously, I had a shell script that would do this:

    scp -r $localFile $username@$remoteHostIP:$remoteDestDir

    This would do a full recursive copy from "localFile" (really, local-dir) to the remoteDestDir location. I don't know how to specify this with the SCP plugin. I guess I could go back to running the shell script, or have several SCP calls that copy each sub-directory over, but that seems weird.

    Any idea how I might do this?
    -Dan.