开发者

TFS 2010 frontend/backend deployment

We have a solution which contains two applications, one for back-end and one for front-end (in back-end some web services, web application and database, and in front-end a light client, WPF application). The build s开发者_如何学Pythonerver is a TFS 2010 server.

Is there a way to create a build definition in TFS that can deploy the font-end, back-end and the database that can be triggered automatically or manually?


You can do operations like file or directory copying/moving/deleting, calling external programs and finally call your own code with build definition. So if your deployment is possible via file/directory copying, then you can do deployment via build definition.


You should have a look at TFS Deployer.

When a build completes, you can change the build quality to another value. TFS Deployer catches this event and runs the script that you tell it.

As long as you can script your front-end and back-end deployments in PowerShell or a batch file, then this service can do the deployment for you.

In the example below: when you change the build quality from 'Under Investigation' to 'Ready for Deployment', it will run the PrepareForDeployment.cmd batch file.

Then when you change the build quality to 'Released' it will run Publish.ps1 and substitute in the ProductionServerName variable.

<DeploymentMappings xmlns="http://www.readify.net/TFSDeployer/DeploymentMappings20061026">

  <Mapping xmlns=""
           Computer="AnotherBuildServer"
           OriginalQuality="Under Investigation"
           NewQuality="Ready for Deployment"
           Script="PrepareForDeployment.cmd"
           RunnerType="BatchFile"
           NotificationAddress="nobody@nowhere.test.com" />

  <Mapping xmlns=""
           Computer="FinalBuildServer"
           OriginalQuality="Ready for Deployment"
           NewQuality="Released"
           Script="Publish.ps1"
           RunnerType="PowerShell"
           NotificationAddress="nobody@nowhere.test.com"
           PermittedUsers="MYDOMAIN\Boss;OTHERDOMAIN\Admin">
    <ScriptParameter name="ProductionServerName" value="ProdSvr1" />
  </Mapping>

</DeploymentMappings>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜