2
votes

Is it possible to do a Web Deploy using an Azure DevOps pipeline task and perhaps using the .publishsettings file? I found WinRM but it's not clear how the publishsetings correlate to the WinRM parameters. Thanks

1

1 Answers

4
votes

Is it possible to do a Web Deploy using an Azure DevOps pipeline task

There are multiple tutorials about how to deploy web Deploy through TFS/VSTS in google.

First, we need use some the properly MSBuild Arguments in our build task to create a package that needs to be published, like:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"

Then we could use the task Copy and Publish Build Artifacts to copy zip package to share. We could also use a parameters.xml in your web app to get the web config parameters assigned to .setparameters.xml so that you can change values in the deployment time using IIS deployment task.

Once your package is ready, we could use following two steps to deployed app:

  • create and run site and app pool – WinRM – IIS Web App Management

  • publish our app – WinRM – IIS Web App Deployment

Check the this tutorial IIS web deploy by vsts and the similar thread for some more details.

Hope this helps.