VSTS: Release Management Deploying Artifacts to IIS on Premise
Asked Answered
L

3

5

I am using VSTS Release management to deploy artifacts to IIS websites. I have several Web applications and web services to be deployed. So, i am trying to figure out what sort of tasks that best fits my situation.

I have created a build definition with Visual Studio Build Task for projects as this one: enter image description here

which works fine but i need to add a task for copying the artifacts Under IIS Website Directory.

The other approach is to use IIS web deployment as a task in Release definition, so I created the build definition as:

enter image description here

However, it expects a Publish Profile (the build fails because it can't find it). I don't need to create a publish profile for each project in the application because this would be too much work.

Is there is a workaround for that or what is preferred approach for this?

Lavabo answered 12/5, 2016 at 21:53 Comment(0)
R
3

You can update your build definition to generate a web deployment package and upload it to artifacts. And then in Release Management, add a task to run "projectname.deploy.cmd" in the deployment package to deploy it to your IIS server. Refer to this link for details: How to: Install a Deployment Package Using the deploy.cmd File Created by Visual Studio.

And you can also enable FTP Publishing on your IIS server and add a task in your release to publish the artifacts via FTP. You may need this task: FTP Uploader.

Roundabout answered 13/5, 2016 at 0:43 Comment(0)
M
3

My Continuous Delivery with TFS / VSTS – Server Configuration and Application Deployment with Release Management blog post (with reference to some previous posts) has all the details you need for deploying your artefacts to target nodes using Windows Machine File Copy tasks then use PowerShell on Target Machines tasks to get them in to correct locations and to do token replacement and anything else that's required.

I would recommend using PowerShell DSC so that IIS is properly configured before deployment but that's not required. Where possible for web apps I favour keeping things very simple by creating artefacts that contain all the web files that are needed for a particular folder and then just using plain xcopy for the deployment.

Michelinemichell answered 13/5, 2016 at 12:50 Comment(0)
K
2

If you need more control you can also use my MSDeploy VSTS extension to deploy a MSDeploy package

https://marketplace.visualstudio.com/items?itemName=rschiefer.MSDeployAllTheThings

https://dotnetcatch.com/2016/04/20/msdeployallthethings-vststfs-extension-is-public/

Kill answered 13/5, 2016 at 10:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.