Child pages
• Deployer plugin
Icon

The plugin is bundled since TeamCity 10.0. The recent version is described in the online documentation for the latest TeamCity version.

General Info

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

Last stand-alone version: deploy-runner.zip

Description

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

Usage

After successful installation, new Build Runners will be available in the Build Step selector of a build configuration.
Most of deployers use TeamCity artifact paths to define which files will be deployed. Artifacts paths have the following syntax:

Icon

target_directory and target_archive are always treated as relative to a remote location specified in the Target parameter of the runner.

Refer to the TeamCity documentation for details.

SMB Deployer

Implementation relies on the JCIFS library. To configure the JCIFS client using system properties, update the TeamCity Agent startup properties Configuring Build Agent Startup Properties.

Target URL should point to a host + share at least. Subdirectories are allowed here and will be created if missing. Valid examples:

Name resolution (advanced option) - allows to switch JCIFS to "DNS-only" mode. May fix perfomance or out of memory exceptions (see this bitbucket issue for details). Is equivalent to following JCIFS settings:

FTP Deployer

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

Secure connection allows choosing between an insecure (FTP) or secure connection (FTPS, SFTP).

Limited security note

Icon

The current secure connection implementation accepts any certificate provided by a remote host. No trust checks are performed!

Transfer Mode allows you to force the ASCII or Binary FTP transfer modes (if the automatically detected mode leads to broken files transfer)

SSH Deployer

Target should point to an SSH server location. The syntax is similar to the one used by the *nix scp command:

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

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

Authentication method allows choosing an SSH authentication method.

• "Default private key" will try to perform private key authentication using the ~/.ssh/config settings. If no settings file exists, will try to use the ~/.ssh/rsa_pub public key file. No passphrases should be set.
• "Custom private key" will try to perform private key authentication using the given public key file with given passphrase
• "SSH-Agent" - use ssh-agent for authentication. To be used in combination with TeamCity SSH-Agent build feature. Available since 9.1

Limited security note

Icon

Current secure connection implementation accepts any certificate provided by remote host. No trust checks are performed!

SSH Exec

Allows executing arbitrary remote commands using SSH

Target should point to an SSH server.

Authentication method allows choosing an SSH authentication method.

• "Default private key" - will try to perform private key authentication using the ~/.ssh/config settings. If no settings file exists, will try to use the ~/.ssh/rsa_pub public key file. No passphrases should be set.
• "Custom private key" will try to perform private key authentication using a given public key file with a given passphrase
• "SSH-Agent" - use ssh-agent for authentication. To be used in combination with TeamCity SSH-Agent build feature. Available since 9.1

Limited security note

Icon

Current secure connection implementation accepts any certificate provided by remote host. No trust checks are performed!

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

Container Deployer

Allows deploying WAR application archives to a remote Tomcat instance
Supports the following Tomcat versions: 5.x, 6.x, 7.x and 8.x

Requires Manager webapp installed in the target Tomcat instance and a user with the "manager-script" role.

Compatibility

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

Sources

https://github.com/JetBrains/deployer

Issue tracker

https://github.com/JetBrains/deployer/issues

Continuous Integration

The current build status is
Detailed CI status page

Third party libraries

 Name Site License Cargo Cargo library Apache 2.0 Commons-Net Commons-Net Apache 2.0 JSch JSch BSD-style JCifs JCifs LGPL 2.1
• No labels

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

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

3. is it possible to provide multiple hosts comma separated?

1. 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. 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. 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. Thank you for your feedback. I have received an issue regarding dots in UNC paths.

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

1. Yes.

6. 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.

Thanks

Gomathi.

1. 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

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. Thank you!! This worked

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

Cheers

Gomathi.

8. Is it possible for SSH Exec to respond to prompts?

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

9. 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. This issue was fixed in recent builds. Please, update the plugin.

1. Thank you Nikita, that's sorted the issue!

10. 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)

11. 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. 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. Thanks, I've submitted an issue as requested.  Issue Id: TW-35844

12. Thank you very much for this plugin, please don't stop the development, very useful project.

Error: jetbrains.buildServer.server.rest.errors.NotFoundException: No build can be found by id '135774'.
Could not find the entity requested. Check the reference is correct and the user has permissions to access the entity.

1. Thank you for reporting. I have fixed the link.

14. Hello Nikita.

Thanks for your work. Can you please tell me - how can I undeploy a war before deploy a new one?

Thank you!

1. Roman,

There is no dedicated "undeploy" procedure (yet). With Tomcat container, re-deploying over existing application should work fine. If it does not, please report to https://bitbucket.org/nskvortsov/deployer/issues

2. The re-deployment issue is fixed. Thank you for the report.

1. Thank you, Nikita.

The plugin works awesome!

1. You are welcome. If you have any other feedback, maybe a missing feature - I'll be glad to hear about it.

15. Hi,

Recently we've been receiving 99% of the time an exception when we run the FTP step:

It.sauronsoftware.ftp4j.FTPDataTransferException: I/O error in data transfer

The FTP process was working fine until our repository grew to over 300 individual files.  The logs show FTP process can start, transfer a few files then it chokes then raises the exception.

Any ideas what could be causing the exception?

Thanks

1. Hi Anton.

Hard to tell anything without logs. Please, enable Agent-side debug logging (using this instruction) and wait for the problem to reproduce.

Open a new issue here https://bitbucket.org/nskvortsov/deployer/issues and attach resulting teamcity-agent.log file there. Also, FTP server logs would be useful.

1. Thanks for the prompt response:

16. Is there a limit to how many files the uploader will attempt to upload?

Yet, in our configuration, we have the following:

Do you know of any limitation? I thought it might be a server timeout error, but without an error being reported, it doesn't seem likely.

Thanks,

- Matt

1. That really deserves an issue in tracker.
Please report it to BitButcket: https://bitbucket.org/nskvortsov/deployer/issues

Attach :
* deployer step settings screenshot
* full build log
* teamcity-agent.log file (located on build agent that executed the buildstep).

If requested files contain sensitive information and you can not make them public, please e-mail them to me for investigation: n.s.skvortsov [ at ] gmail

2. Hello Matt,

I have fixed this issue. Please grab new build of the plugin.

17. Hello, Nikita. We have troubles with deploying .war file to Tomcat 7, when we use new version of Deployer Plugin. With older version all was fine. Can you help us?

" org.codehaus.cargo.container.ContainerException: Failed to create deployable with implementation class org.codehaus.cargo.container.tomcat.TomcatWAR for the parameters (container [id = [tomcat6x]], deployable type [war])"

1. Serhii,

Please, post an issue to https://bitbucket.org/nskvortsov/deployer/issues&nbsp;
Attach Deployer settings page screenshot, build log and teamcity-agent.log file

18. Hi Nikita,

Thanks for the idea. We have implemented SSH, FTP correctly. Also, implemented SMB with out using the JCIFS library and it worked fine as we were able to deploy a file from one windows server to another. But, I would like to understand what is the significance of jcifs library in the SMB deployer and how will it be useful? Are there any circumstances of non usage of this library for implementation of SMB Deployer?

1. Mohammed,

JCIFS library offers implementation of basic operations required by SMB client running on jvm. Thanks to that, SMB deployer can upload files to windows shares from (almost) any operating system (Windows, Linux, MacOS, FreeBSD). SMB Deployer does not depend on unerlying OS's ability to connect to windows shared folder.

19. Hello,

In the ftp deployer plugin we're receiving the error
[Step 3/3] java.lang.NoSuchMethodError: jetbrains.buildServer.agent.impl.artifacts.ArtifactsBuilder.setCaseInsensitivePatterns(Z)V at jetbrains.buildServer.deployer.agent.base.BaseDeployerRunner.createBuildProcess(BaseDeployerRunner.java:44) at jetbrains.buildServer.agent.impl.runner.CallRunnerService.doCreateBuildProcess(CallRunnerService.java:71) at jetbrains.buildServer.agent.impl.runner.CallRunnerService.createBuildProcess(CallRunnerService.java:47)

Same problem is defined in the previous comments ( by Darren Williams ) and solution was given as updating to the latest build.

But we receive this error although we are using the TeamCity 8.1.5 (build 30240). (Currently latest version)

Do you have any ideas why this issue might be happening or any solutions?

Thank you,
John

1. Solved...

Well, I did a full update on the Team City although I should have only updated the deployer plugin as described in the installing additional plugins. After the plugin update the problem is fixed.

Cheers,
John

20. Is it possible to have the SSH runners use the uploaded SSH keys? I don't see how to do this in the interface. Currently I'm successfully using an uploaded key to identify the TeamCity server as a collaborator in my git-based project, allowing TeamCity to generate and push out new tags.

However when it comes to running these SSH tasks, I would like to be able to use the same TeamCity identity via PKI and I don't see how to specify the uploaded private key. I have to either use a default key location (~/.ssh/key) or specify a path to locate the key file. Am I overlooking something that would allow me to use the uploaded key I already have configured on the server?

Edit: adding the fact that I'm using version TeamCity Enterprise 8.1.4 build 30168.

1. John,
Unfortunately, this is not currently implemented. Please watch/vote for this request: https://youtrack.jetbrains.com/issue/TW-34011

2. i've had the same problem.

l  read SSH Keys Management and understood that i will fine the private key uploaded for the project here "<TeamCity Data Directory>/config/<project>/pluginData/ssh_keys"

in my case it was "D:\TeamCity\Data\config\projects\Web\pluginData\ssh_keys\sdstage2"

and it works. try.

21. Hi,

Teamcity 9.0.3 (build 32334). When i am trying to deploy artifacts to the server , I am facing an auth fail if using ssh deployer option as build runner . used Default private key for authentication. Please advice what would be the correct options and values when using deployer plugin. Thanks in advance

[Step 1/1] 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:86) at jetbrains.buildServer.deployer.agent.ssh.SSHDeployerRunner.getDeployerProcess(SSHDeployerRunner.java:44) at jetbrains.buildServer.deployer.agent.base.BaseDeployerRunner.createBuildProcess(BaseDeployerRunner.java:47) at jetbrains.buildServer.agent.impl.runner.CallRunnerService.doCreateBuildProcess(CallRunnerService.java:71) at jetbrains.buildServer.agent.impl.runner.CallRunnerService.createBuildProcess(CallRunnerService.java:47) at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:47) 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:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44) 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:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70) at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50) at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:266) at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:51) at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:231) at java.lang.Thread.run(Thread.java:745)

1. Hello, Indira

Please, report the issue to https://github.com/JetBrains/teamcity-deployer-plugin/issues

1. Thanks Niki,I have added the new issue for this deployer auth fail : https://github.com/JetBrains/teamcity-deployer-plugin/issues/61: Also attached required info.

Please let me know if you need any more details reg this.

thanks,

Indira

22. Hi. What if I need to clean the target FTP directory from files that are already there. Does FTP Deployer support this? I see it probably doesn't do you plan to add this in future? Thanks!

1. Hello Max,

23. Does the ftp deployer overwrite any existing files? I don't see this option in the plugin.

1. FTP deployer should overwrite any files in the destination. If it does not, please add an issue here https://github.com/JetBrains/teamcity-deployer-plugin/issues

24. I am trying to use the SMB Deployer to deploy a website to a webserver (using SMB). I was able to figure out the Artifiacts issue that I had, but now that I resolved it, I am getting a 'jcifs.smb.SmbAuthException: Access is denied.' issue on the SMB build step. I am deploying all of the changed files from the VCS Root to the Target Root, including files in subfolders.

The errors that i am seeing are:

[13:00:27]Step 1/1: Copy to ********** (SMB Deployer) (33s)
[13:00:30][Step 1/1] Starting upload via SMB to \\******\websites\******
[13:01:01][Step 1/1] jcifs.smb.SmbAuthException: Access is denied.
[13:01:01][Step 1/1] Step Copy to ********** (SMB Deployer) failed

I am pretty certain that I have granted all of all of the Windows rights necessary to modify files to the correct user that the TeamCity services run under. What am I missing?

Thanks,

Glen Parnell
1. Glen, please enable build agent debug logs as described here: Viewing Build Agent Logs
Then find line

Trying to connect with following parameters..

in teamcity-agent.log file. It will contain username/domain that is used for upload

1. Thank you. I changed the domain information from 'domain.local' to just domain. Now I have a different error (below). What is causing this error?

[15:23:58][Step 1/1] Failed to start build runner 'smb-deploy-runner'
[15:23:58][Step 1/1] java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:714) at jcifs.UniAddress.lookupServerOrWorkgroup(UniAddress.java:173) at jcifs.UniAddress.getAllByName(UniAddress.java:290) at jcifs.UniAddress.getByName(UniAddress.java:245) at jcifs.smb.Dfs.getTrustedDomains(Dfs.java:62) at jcifs.smb.Dfs.resolve(Dfs.java:167) at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:671) at jcifs.smb.SmbFile.send(SmbFile.java:773) at jcifs.smb.SmbFileOutputStream.writeDirect(SmbFileOutputStream.java:245) at jcifs.smb.SmbFileOutputStream.write(SmbFileOutputStream.java:216) at jetbrains.buildServer.deployer.agent.smb.SMBBuildProcessAdapter.copyInterruptibly(SMBBuildProcessAdapter.java:146) at jetbrains.buildServer.deployer.agent.smb.SMBBuildProcessAdapter.upload(SMBBuildProcessAdapter.java:129) at jetbrains.buildServer.deployer.agent.smb.SMBBuildProcessAdapter.runProcess(SMBBuildProcessAdapter.java:89) at jetbrains.buildServer.deployer.agent.SyncBuildProcessAdapter.start(SyncBuildProcessAdapter.java:58) at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:58) 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:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44) 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:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70) at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50) at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:284) at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:52) at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:248) at java.lang.Thread.run(Thread.java:745)
1. Now the auth is successful, but you are facing https://github.com/JetBrains/teamcity-deployer-plugin/issues/20

1. I enabled "use DNS only name resolution" feature under "advanced" options. However, the system has now gone back to

Step 1/1: Copy to ********** (SMB Deployer) (1m:17s)
[11:14:58][Step 1/1] Starting upload via SMB to \\**********\websites\**********
[11:16:00][Step 1/1] jcifs.smb.SmbAuthException: Access is denied.
[11:16:00][Step 1/1] Step Copy to ********** (SMB Deployer) failed
1. Once again, in debug logging, is Username/domain information correct?

1. The Username/domain/password information is correct. I did not change the username or password when I updated the "use DNS only name resolution" feature. I have tried re-entering the password and that did not fix it either.

1. Please, consult the event viewer on target machine, look for failed auth attempts.

1. I cannot find any failed Auth attempts. Does that mean that the system is probably not able to resolve the system name?

1. A coworker and I were finally able to spend some time looking into this issue. We determined that the issue was with the folder name in question. The folder name that was having issues was \\ficatlibmsweb\websites\ibms.laptv.com\, which never would work. After some testing, without changing permissions or anything else, we were able to get the system working delivering files to  \\ficatlibmsweb\websites\lalala\ and \\ficatlibmsweb\websites\ibmsweb\. The only difference between these folders that I could find was the ',laptv.com'. My guess is that the system does some automatic stripping of extensions or something like that, so it is removing part of the path name, which would not allow the system to write out.

1. Hello Glen,
Thank you very much for the investigation! I will  investigate this further to find the root cause.

1. I've had quite the same issue with a TC server 10.0.04: the problem seems to be related to a space in the share folder (\\kappa.int\fra prototypes) because it now works if I replace it with the DFS name which does not contain any space.

25. I use this **/mywar-1.0.war in Artifacts path to deploy my war file with ssh deployer, but it deployed my file with its directory to dest, like this

dest/build/libs/mywar-1.0.war, but i need it like this, dest/mywar-1.0.war, any idea?

1. Please, use the full path dest/build/libs/mywar-1.0.war

The part matched by pattern is created on target site

26. What are the plans for this essential plugin? Will it ever reach production status?

1. The plugin is still in development. A stable version may be delivered with next major TeamCity release

Given that it has already existed for three years, is it safe to assume that any changes prior to release will be minor?

1. Not really.

For example, right now the plugin goes through some heavy refactoring of FTP subsystem.

27. I found another issue - the SMB delivery system does not currently work for hidden Windows shares (those with a $in the name) such as \\ficatlibmsweb\c$\Program Files (x86)\PHP\IncludeFiles\

The \$ causes the job not to work.

1. Thank you Glen,

I have raised a ticket in our issue tracker: https://youtrack.jetbrains.com/issue/TW-43799

28. Hi,

I am trying to upload a (zip) artifact created by TeamCity. However, as this artifact is only created after completion of all build steps, the upload step cannot find it. Am I missing something, or is this use case not (yet) supported? Thanks!

[11:03:22][Step 2/2] Starting upload via FTP to ftp://ftp-be.simplantweb.com
[11:03:22][Step 2/2] Uploaded [0] files for [bla.zip] pattern
[11:03:23]Publishing internal artifacts
[11:03:23][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[11:03:23][Publishing internal artifacts] Sending using WebPublisher
[11:03:23]Publishing artifacts (2s)
[11:03:23][Publishing artifacts] Collecting files to publish: [testfile.txt => bla.zip]
[11:03:23][Publishing artifacts] Creating archive bla.zip
[11:03:23][Creating archive bla.zip] Creating C:\BuildAgent\buildAgent\temp\buildTmp\ZipPreprocessor3642724061382710924\bla.zip
[11:03:23][Creating archive bla.zip] Archive was created, file size 148 B (148 bytes)
[11:03:25][Publishing artifacts] Publishing using [ArtifactsCachePublisher]
[11:03:25][Publishing artifacts] Publishing using [WebPublisher]
1. Yves,

Please specify the file to upload on "FTP Deployer" build step configuration page, not in "General Settings" tab

1. Thanks for the quick response! So this means that if I want the zip to be available both in the TC web interface and on ftp, I best duplicate the definition of the zip archive in both locations?

1. At the moment, yes. You will have to duplicate.

29. Hi Nikita.

I just installed your plugin to my Teamcity 9 server but I can't get it to work at all. The configuration seems simple enough but I am not sure what I am doing wrong and can't find any example documentation to help.

I am trying to deploy my project war file to my tomcat server using your plugin. But I keep getting a failure with the message [Step 2/2] org.codehaus.cargo.container.ContainerException: Failed to redeploy [C:\TeamCity\buildAgent\work\6a79970e297ab752\src\FirstSpirit\guardian-couchbase\target\couchbase-1.0-SNAPSHOT.war]

My Settings are as follows:

Runner type: Container DeployerRunner able to deploy WAR apps to different containers Deployment Target http://myserver:8080/couchbase/Enter target container info. Use format: {hostname|IP}[:port] TOMCAT 7.xDefault "Manager" web app must be deployed to target Tomcat. User must have role "manager-script". Deployment Credentials My Username My password Web Application Settings Path to war archive to deploy

Can you give me some idea as to what is miss-configured or what values I should be using here. This is the first time I have deployed this to the tomcat server as well so it has never existed before.

Thanks,

1. Daniel,

For the first glance, it looks like everything should be working. Could you please enable agent-side debug as described here and attach resulting teamcity-agent.log file?

30. Hi Nikita,

I'm just trying to do a simple ftp deploy. It works when I deploy to the root. But I get an error when I deploy to any subdirectory like this (target host = 172.17.1.81/test). This is the error Failed to upload artifacts via FTP. Reply was: 500 Syntax error, command unrecognized. Here are the settings (have also tried setting Artifacts to build/** => test

Any ideas on why it doesn't work when deploying to a sub directory?

Thanks,

Mike

1. Hello Mike,
Sorry for the delay. The error should also be logged in FTP server's log. Could you please look up the actual  "unrecognized command" there?

31. Hi..

We are using Deployer plugin and mainly use SSH Exec and SSH deployer. We use common user for most of the deployment and as per companies security policy, password for the common user is changed every month.

As password is stored as part of each TC project/job, we have to update the password for multiple TC jobs every month.

Is it possible to make the password as 'Configuration Parameter' so that it can be defined globally and then all projects will inherit.

1. Hello Rajan,

Since 8.1, TeamCity supports parameter references in password fields. You can define a configuration parameter on Project level and refer to it in the password field in SSH Exec or Deploy.

1. Hello Nikita,
Thanks for the reply. We are using Teamcity v9.1.5.
I have created configuration parameter at project level, but in the build configuration when I try to enter %PARAM% , it takes the input as password field and does not show. I tried to save and run the job but it fails in authentication.

1. Hello Nikita,
following is the Deployer plugin version:

Artifact Deployer
Set of Runners for basic deployment tasks
snapshot-20151111120215 Nikita Skvortsov <TeamCity Data Directory>\.unpacked\deploy-runner

2. There is no way of input field knowing if the entered text is password or parameter, so input always stays hidden (we are aware of this usability problem: https://youtrack.jetbrains.com/issue/TW-43909 )

So, the parameter, defined at the project level, should be available on the build configuration level.
To check, if it is passed corretly, add a simple command line build step, that prints it using "echo"

32. Is there any way to deploy the war file to remote server with jump server?

The noramal setps is like :

2.scp the file to remote server.

3.start remote server etc.

And i want those steps automaticlly do in tc,could it be possible?

1. Hellp Jhon,

Deployer plugin allows to scp flies to remote server using "SSH Deployer" runner. To login|start|stop the server, please use "SSH Exec" runner.

1. Thanks.

33. Hi.
I run a test. I want to login to B from A.
And I have a preset sshkey,so I dont need to enter password when connect from A to B.
But it didt stop when i run the script below on sshexec:

mkdir 180
ssh tomcat@192.168.6.181
mkdir 181

[07:39:25]Updating sources: server side checkout (6s)
[07:39:31]Step 1/1: test (SSH Exec) (running for 5m:57s)
[07:39:31][Step 1/1] Executing commands: mkdir 180 ssh tomcat@192.168.6.181 mkdir 181 on host [192.168.6.180]

what am i suppose to do ?
1. Hello John,
If the question is still relevant, make sure that "ssh tomcat@192.168.6.181" is not interactive (does not need any user input) when executed on host  [192.168.6.180].

34. Hello Nikita,

I had installed TeamCity Professional 9.1.6 (build 37459) and your plugin Deploy-runner and faced with next issue.

Your plugin is availablee in the plugins list but it is not available in the build steps.This plugin is supported for version 9.1.6?

1. Hello,

Yes, the plugin is 9.1.x - compatible.
If you do not see any of the build runners provided by the plugin (e.g., FTP Deployer, SSH Deployer, SMB Deployer), please create an issue in our tracker ( http://youtrack.jetbrains.com/newIssue?project=TW&clearDraft=true&c= ) and attach a TeamCity server log, that contains latest server restart.

35. Is there a way to specify active mode for FTP Deployer to support FTP destinations that only allow active FTP connections?

1. Sorry for delay in replying. The latest build of the plugin should allow choosing Active/Passive mode for FTP.

36. :-S I seem to have hit the same issue as A.G.B in April when trying to install Deployer. I'm running Teamcity 9.0.1 (build 32116).

Would be grateful if some one could provide the steps to resolve this.

1. Simon, please follow same steps as described in my answer to A.G.B (Re: Deployer plugin). I need server restart logs to investigate the issue.

37. I have the same issue than Glen had: I have followed what you said at this time, enabling logging, veryfing credentials, etc. and I cannot understand what is the cause of the problem? I have tried several credentials with or without domain, tried several destination directory, etc. without any difference. [using TeamCity server 10.0.4 (build 42538)]

[16:38:01]Step 4/4: Deployment (SMB Upload) (6s)
[16:38:01][Step 4/4] Creating archive KW.BUILD-5.20.1.0-r887-x64-2017.03.20-16.37.zip (6s)
[16:38:07][Step 4/4] Starting upload via SMB to \\KAPPA.int\Shares\fra prototypes
[16:38:07][Step 4/4] jcifs.smb.SmbAuthException: Access is denied.
[16:38:07][Step 4/4] Step Deployment (SMB Upload) failed

38. I've had quite the same issue with a TC server 10.0.04: the problem seems to be related to a space in the share folder (\\kappa.int\fra prototypes) because it now works if I replace it with the DFS name which does not contain any space.

1. xavier le galles

Thank you very much for investigation. I have filed a ticket in our issue tracker. https://youtrack.jetbrains.com/issue/TW-49192

2. xavier le galles

Thank you very much for investigation. I have filed a ticket in our issue tracker. https://youtrack.jetbrains.com/issue/TW-49192

39. We are using TC 10.0.4 since half a year now. We are deploying mainly web projects (php/ruby based) on remote servers. So there are many SSH Exec steps in every build configuration.

We noticed the same issue on every build with different servers - and it's completely reproducible: After the 5th SSH Exec step the server denies further connections.

Questions:

• Are the connections shared/reused between build steps?
• Do the plugin keeps the connections open after the build step (even one second is too much)?
• Do you ever have noticed this problem?