Question

I have recently set up Automated builds using TFS Build 2012. I have different web servers where I want to publish my application. I have:

1) A build server.
2) DB Server
3) WebServer1 (Web Deploy Agent Installed)
4) WebServer2 (Web Deploy Agent Installed)
5) WebServer3 (Which is the same on which I have set up TFSBuild i.e. build Controller and Agents)

Now when ever I Publish my application manually using RightClick->Publish(Publish Method= Web Deploy) from VisualStudio it is successfully deployed to all the webservers.

Similarly when I QUE a build using TFS Build for WebServer3 (which has BuildController and agent on it) it works fine.

But when I try to do the same for WebServer1 or WebServer2 it just compiles the code and DONT publish anything on server. The worst thing is that it it NOT giving me any error as well. It says Build was deployed Successfully.

I have tried solution posted here but its not working :(

Any help would be highly appreciated. Thanks in advance.

EDIT:

My MSBuild arguments are as follows:

/p:VisualStudioVersion=11.0 
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish 
/p:MSDeployPublishMethod=WMSVC 
/p:AllowUntrustedCertificate=True 
/p:PublishProfile=Application 
/p:MsDeployServiceUrl="https://WebServer3" 
/t:Build;Publish  
/p:SqlPublishProfilePath=DB.publish.xml

I have explicitly asked set /p:DeployOnBuild=True but even then its not publishing.

However like I explained earlier it deploy successfully for the sever on which I have installed the build controller and agents.

Is there any requirement that for every webserver you must install the build controller and agents. I dont think its a good idea.

Was it helpful?

Solution

Ultimately I figured out what was wrong.

The problem was that there was no Build Controller Agent Installed on WebServer1 and WebServer2 due to which the TFS build was unable to transfer my build to that server. But there MUST be some error for this.

I tried it after installing the build controller agent on webserver1 and webserver2 and it worked !

OTHER TIPS

We worked a whole chapter in the Build Customization Guidance: "Deployment of Applications and Data Stores".

Create a Build Definition for each web server and set the correct value for

MSDeployServiceUrl

This is the address of the remote agent service installed in the Web Deploy. Using this URL the Web Deploy will be contacted to publish the application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top