1

I am modifying a copied build process template BuildAndDeploy.xaml to include a InvokeProcess activity. This activity would run the _PublishedWebsites\ProjectName_Package\ProjectName.deploy.cmd to deploy the web application to the QA server. Eventually I would run ProjectName.deploy.cmd multiple times for each of the servers in the web farm. Everything works fine manually but through the TFS build agent, the _PublishedWebsites folder and its contents are created too late. My first attempt was to add the InvokeProcess activity inside "Compile the Project" sequence as last step. Then I moved it after "If Not DisableTests". To troubleshoot I am running a dir /s command in the BuildDetail.DropLocation folder and it always outputs only logs folder and nothing else. I have also verified manually that the compiled output and the _PublishedWebsites folder and its contents are created after the point where I would like to run the ProjectName.deploy.cmd file. What location in the workflow would be ideal and guaranteed to have the ProjectName.deploy.cmd file and other related packaged content ready?

I am following approach given in accepted answer in TFS2010 Build Definition to Deploy to multiple servers.

The build drop location is a UNC path, if that matters. The parameters used in the MSBuild are /p:DeployOnBuild=True. The TFS Build creates the package properly and I can run the ProjectName.deploy.cmd and the web deploy runs smoothly.

Community
  • 1
  • 1
amit_g
  • 30,880
  • 8
  • 61
  • 118

1 Answers1

2

The BuildDetail.DropLocation\_PublishedWebsites is created in activity Revert Workspace and Copy Files to Drop Location which is in the Finally of outer Try Compile, Test, and Associate Changesets and Work Items. The appropriate location to look for this file would be BinariesDirectory\_PublishedWebsites instead of BuildDetail.DropLocation\_PublishedWebsites. That folder and all the files are created by MSBuild activity itself.

amit_g
  • 30,880
  • 8
  • 61
  • 118