Deployer plugin

Skip to end of metadata
Go to start of metadata

General Info

Vendor Nikita Skvortsov
License Apache 2.0
Type open-source
Status alfa

Description

Enables TeamCity to upload artifacts to external locations in a number of ways.

Installation

Follow the TeamCity documentation on installing additional plugins.

Usage

After successfull installation, new Build Runners will be available in Build Steps configuration
Most of deployers use TeamCity artifact paths to define which files will be deployed. Artifacts paths has following syntax:

Please note:
target_directory and target_archive are always treated as relative to remote location specified in Target runner parameter

Refer to TeamCity documentation for details.

SMB Deployer

Allows to upload files to Windows shares via SMB protocol. Configuration includes domain, username and password.
Target URL should point to a host + share at least. Subdirectories are allowed here and will be created if missing. Valid examples:

Implementation relies on JCIFS library. To configure JSCIFS client using system properties, update TeamCity Agent startup properties (see this documentation page for details).

FTP Deployer

Allows to upload files to FTP server.
Target host should point to an FTP server (by hostname or IP address) and remote directory (relative to FTP user's home). To use absolute *nix path, use %2F as the forward slash. For example:

Authentication method is either Anonymous (will submit username "anonymous" and single space as password) or username/password (for custom credentials)
Transfer Mode allows to force ASCII or Binary FTP transfer modes (if automatically detected mode leads to broken files transfer)

SSH Deployer

Allows to upload files via SSH (using SCP or SFTP protocols)
Target should poing to an SSH server location. Syntax is similar to one used by *nix scp command:

where target_dir can be absolute or relative; sub_path can have any depth.

Transport allows to choose protocol to transfer data over SSH. Options are: SCP and SFTP

Authentication method allows to choose SSH authentication method.

  • "Default private key" - will try to do private key authentication using ~/.ssh/config settings. If no settings file exists, will try to use ~/.ssh/rsa_pub public key file. No passphrases should be set.
  • "Custom private key" - will try to do private key authentication using given public key file with given passphrase
  • "Password" - simple password authentication.
SSH Exec

Allows to execute arbitrary remote commands using SSH

Target should point to an SSH server.

Authentication method allows to choose SSH authentication method.

  • "Default private key" - will try to do private key authentication using ~/.ssh/config settings. If no settings file exists, will try to use ~/.ssh/rsa_pub public key file. No passphrases should be set.
  • "Custom private key" - will try to do private key authentication using given public key file with given passphrase
  • "Password" - simple password authentication.

Commands is a new-line delimeted set of commands, that will be executed in the remote shell. Remote shell will be started in a home directory of authenticated user. Shell output will be available in TeamCity build log.

Tomcat Deployer

Deprecated, will be replaced in future versions.
Allows to deploy WAR application archives to a remote Tomcat 6.x instance (requires Manager webapp installed in the target Tomcat server)

Compatibility

TeamCity 7.0+
Oracle JDK 1.6 or OpenJDK 1.7.0_07 and later.

Sources

https://bitbucket.org/nskvortsov/deployer/src

Issue tracker

https://bitbucket.org/nskvortsov/deployer/issues

Continuous Integration

Current build status is
Detailed CI status page

Download

Latest release: deploy-runner.zip

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Dec 12, 2012

    Brilliant idea. We especially like SSH runners. Wish you luck in development and hope you'll progress it to production level soon :)

  2. Dec 13, 2012

    need Glassfish deployer too. Cool idea. Want to deploy via intellij project run configuration remote glass fish

  3. Apr 15, 2013

    is it possible to provide multiple hosts comma separated?

    1. Apr 15, 2013

      No, you can only have one target host at a time.

      Could you explain, why do you need to deploy same artifacts to a number of lockations simultaneously?

      As a work around, you can use build parameters to store common information (like username/password/artifact paths) and create several build steps that only differ in target feild.

  4. Apr 15, 2013

    Thanks for prompt reply,  I did created build steps that differs on target host but it is not efficient when deployment needs to be selective based on specific Env where each target environment may have 10/20 hosts, would be nice to use comma separated list or something similar and provide it to deployer target. 

  5. Sep 02, 2013

    Deployers work really good. I like how they use the standard artifact syntax. I have two suggestions, though:

    • SMB Deployer doesn’t accept dots in the UNC path set for the target URL, elthough it would still be a valid path.
    • It would be great if deployers could be configured to copy / uplaod only files that are newer than in destination.
    1. Sep 03, 2013

      Thank you for your feedback. I have received an issue regarding dots in UNC paths.
      Would you mind opening separate request for uploading only newer files?

      1. Sep 03, 2013

        Sure, no problem. If I understand correctly, I should open an issue for that on YouTrack (http://youtrack.jetbrains.net/issues/TW)?

        1. Sep 04, 2013

          Yes.

  6. Nov 20, 2013

    Hi,

    I am trying to install this plugin in Teamcity, but my teamcity server is not getting started with the library files, this is the error message we are getting.

    Error creating bean with name 'scpDeployerRunType' defined in URL [jar:file:/D:/TeamCity/webapps/ROOT/WEB-INF/lib/deploy-runner-server-1.0-SNAPSHOT.jar!/META-INF/build-server-plugin-deploy-runner.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type 

    I have copied the deployer-runner-common and deployer-runner-server jars on the library path and the server was complaining on this error.

    Can you please help me in resolving this? The teamcity version i am using is 7.0.2

    Thanks

    Gomathi.

    1. Nov 21, 2013

      Gomathi,

      I apologize for broke link to installation instructions. I have fixed it to point to http://confluence.jetbrains.com/display/TCD7/Installing+Additional+Plugins

      As to your case,

      1. Shutdown the server

      2. Remove plugin jars from WEB-INF/lib directory

      3. Copy deploy-runner.zip to <TeamCity Data Directory>/plugins directory.

      4. Start server

      1. Jan 31, 2014

        Thank you!! This worked

  7. Nov 21, 2013

    Thank you so much for your prompt reply, i will try this and update you!!

    Cheers

    Gomathi.

  8. Dec 03, 2013

    Is it possible for SSH Exec to respond to prompts?

    1. Dec 23, 2013

      Unfortunately, no. Script is passed to remote side as a single command.

  9. Dec 20, 2013

    Hi, I've just installed TeamCity 8.1 EAP build 29581 and my build throws the following error when executing the Deployer build step:

    I'm not sure if this is an issue directly with the Deployer Plugin or an issue with the new TC build. Please are you able to advise?

    1. Dec 23, 2013

      This issue was fixed in recent builds. Please, update the plugin.

      1. Dec 25, 2013

        Thank you Nikita, that's sorted the issue!

  10. Jan 31, 2014

    Hi,

    I am able to use this plugin successfully with one server ,but on the other it got failed for authorization. I am using default private key option from the sshexec and i am able to connect to this server using plink.

    Here is the error log from teamcity. Thanks a lot in advance for your help.

    com.jcraft.jsch.JSchException: Auth fail[10:41:13]com.jcraft.jsch.JSchException: Auth fail

    com.jcraft.jsch.JSchException: Auth fail

     at com.jcraft.jsch.Session.connect(Session.java:512)

     at com.jcraft.jsch.Session.connect(Session.java:183)

     at jetbrains.buildServer.deployer.agent.ssh.SSHSessionProvider.<init>(SSHSessionProvider.java:80)

     at jetbrains.buildServer.deployer.agent.ssh.SSHExecRunner.createBuildProcess(SSHExecRunner.java:25)

     at jetbrains.buildServer.agent.impl.runner.CallRunnerService.createBuildProcess(CallRunnerService.java:40)

     at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:45)

     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:25)

     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)

     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)

     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:36)

     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18)

     at jetbrains.buildServer.agent.impl.buildStages.startStages.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:40)

     at jetbrains.buildServer.agent.impl.buildStages.startStages.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:68)

     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)

     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)

     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)

     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:36)

     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)

     at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:70)

     at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:50)

     at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:242)

     at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:47)

     at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:215)

     at java.lang.Thread.run(Unknown Source)

  11. Mar 28, 2014

    Is there any way I can use a configuration parameter within the Target URL field?  I've added a custom parameter to the Build Configuration area and can choose it from the parameter browser button next to the Target URL field but saving the changes results in an 'Invalid URL' error.

    1. Mar 28, 2014

      Looks like it is an issue with URL vaildation code ignoring the parameters. Please report it to issue tracker and I will do my best to fix it soon

      1. Mar 28, 2014

        Thanks, I've submitted an issue as requested.  Issue Id: TW-35844