Publish artifacts after certain build step

邮差的信 提交于 2019-12-02 18:21:06

We do something similar for one of my projects. We use 2 build configurations.

The first one builds the solution, runs unit tests and produces the artifacts.

The second build is set up with an Artifact Dependency on the last successful build. That means the second build will start out grabbing the artifacts from the first build. The second build would have a build step that uploads to the ftp site. The second build is setup with a Finish Build Trigger pointing to the first build. That will make it kick off whenever the first build finishes.

It's a bit more work this way, but once you have it setup it works pretty well.

If your aim is to upload artifacts to TeamCity server you do not need any external plugins, just fill in "Artifact paths" on the General Settings for the build configuration. Likewise, you can publish artifacts during the build via printing specially-formatted text into standard output, a "service message"

You will need the plugin mentioned only if you want to upload to some FTP, not related to TeamCity.

According to the above ticket, TW-1558 External artifact publishing (FTP, copy) There is a new plugin appears to fix this problem. (I have not used it.)

http://confluence.jetbrains.com/display/TW/Deployer+plugin In build configuration settings, new runners will be available for the build steps. New runners include:

  • SMB Deployer - upload files to Windows shares via SMB protocol
  • FTP Deployer - upload files to FTP servers
  • SSH Deployer - upload files via SSH (using SCP or SFTP protocols)
  • SSH Exec - execute arbitrary remote commands using SSH
  • Tomcat Deployer - deploy WAR application archives to a remote Tomcat instance (requires Manager webapp installed in the target Tomcat server)

Its worth noting that as of TeamCity 8 you can use the Meta-Runner feature to build artifacts by sending a message to the build log.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!