views:

45

answers:

2

OK, I've searched for a few days now and still haven't found what i would deem to be an elegant solution to this problem.

Here's what I want to happen.

  • I want TeamCity to Build my code
  • Then test it
  • Then deploy it to a remote server.

The first 2 are easy, but nobody seems to have a nice option for deploying. I have set up the server with web deploy support (was it previously known as msdeploy?) and from my local machine i can publish it to the remote server.

I would ideally like teamcity to be able to allow for the web site to be published remotely after successfully building and testing.

Please tell me somebody has a solution to the problem! I am glad it's almost friday as i am close to tears and need alcohol to help me.

Thanks in advance.

A: 

I'm working on the same issue, too. I have two ugly solutions so far:

1) Use a fixed working directory folder. Then code is always compiled to the same place. Do an XCOPY/FTP from the bin\RELEASE folder to your target server or folder.

2) Write a script that searches the artifact folder using some large version number (999) and then checking each smaller version number until you find a folder with that version number. This also can be done for the URL if you are getting your artifacts via curl & the artifacts web page.

3) Post questions on sites like this until I can find out some msbuild property, environment variable or other similar device to get the artifact URL or filesystem path to it (understanding that teamcity supports building on server farms, so a file system path might need to include a UNC name to know for sure where it is coming from)

MatthewMartin
A: 

We do something very similar but separate the last task out into it's own build which is scheduled to deploy the most resent successful build on a nightly basis to stop the website going up and down every time a developer commits. We didn't use msdeploy but you may find the following links usefull:

Automated deployments with TeamCity, Deployment projects & SVN

Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong

Web Packaging: Creating web packages using MSBuild

Bronumski