How to use SSH deployer plugin with Teamcity?

Hello All,

I am trying to use SSH Deployer to move files from SVN to deployment server using Teamcity.

Everytime build fails.

Please provide steps to do the same.

What I need to pass in Target and Artifacts path and in what format?

Thanks.

7 comments
Comment actions Permalink

Hi,

You shouldn't deploy from svn. Deploy the build artifacts.

The way I'm doing it is to run my build and finish off by simply running a deploy step which is essentially only a command line script. The script is using rsync to make sure the remote folder is up to date. The script will run in the location the artifacts are created.

Here's what I use to deploy to my build server:
rsync --delete --rsh=ssh -avz . ldb01:/usr/share/nginx/wwwbuild

Obviously you can do what ever you want in your script. It'll also help a lot to set up password-less authentication between the servers.

If you really want to deploy from svn, create a script on the remote server to update from svn and call that from TeamCity vi ssh.

/Kristian

0
Comment actions Permalink

Hello,

May I ask you to attach a build log with failing SSH deployer to this thread?

I general, to deploy something using SSH deployer, you need:

  1. Checkout required sources from SVN
  2. Build them as needed
  3. Use the SSH deployer step
    • Target is target host (ip or hostname) with optional remote path e.g.   192.168.0.133:remote/dir
    • Transport is either SCP or SFTP - these are two ways to transfer files over ssh connection.
    • Port - optional parameter in case your SSH server accepts connections on port other than 22
    • Deployment Credentials - user name and password. Certificate-based auth is not supported yet
    • Deployment source - artifact paths with same format as Build Artifacts. See this doc for details. Basically, this is where you specify where should your artifacts go on remote side. All target paths are relative to remote directory selected in Target section.
0
Comment actions Permalink

Thanks a lot.

Does SSH deployer work for Windows server as a target machine?

0
Comment actions Permalink

Does SSH deployer work for Windows server as a target machine?

0
Comment actions Permalink

Yes, if you have SSH server running on target Windows host

0
Comment actions Permalink

Thanks. It is a great help.

Please suggest some free SSH server for windows if you are aware of any.

0
Comment actions Permalink

Google search results show numerous options.

For example, you can start with OpenSSH

0

Please sign in to leave a comment.