As we’ve seen in the previous post, we can automate the creation of a deployment package to automate deployment of web applications.
What we’ve seen until now is just the beginning: in this post we’re going to cover the fully automated deployment workflow.
But before of that, we need a prerequisite: the Web Deployment Tool.
It’s downloadable from the Web PI Installer, and the only configuration needed is this (on the target server).
After that, do you remember the MSBuild Argument to pass inside the Build Definition? It was:
Instead right now we need a little more verbose one:
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=InProc /p:MSDeployServiceUrl=<server> /p:DeployIisAppPath="Default Web Site/<mypath>" /p:UserName=<domain>\user /p:Password=<password>
It creates a package which gets pushed to the server running the WDT, and automatically executed.