Azure DevOps release pipeline IIS app - How to deploy files first then manage web app to point app to new files

Viewed 246

I have an IIS web app running at "foo.bar.com/MyApp"

Website Name: "foo.bar.com" Virtual Application = "/MyApp"

The release pipeline job typically runs "IIS Web App Manage" first (to setup app pool, identity, virtual path, physical path, etc.). Then it runs "IIS Web App Deploy" to extract files from the build artifact package then deploy the files to the virtual path IIS Web App Deploy

I can get the build artifact's BuildNumber using variable: $(Release.Artifacts.{alias}.BuildNumber). So I'd like to create a new physical path based on the BuildNumber e.g., F:\releases\MyApp\PROD\20211114.1

So I'd like to run "IIS Web App Deploy" first, then run "IIS Web App Manage" immediately after to reduce down time and point the web app to the new physical path but it seems there's no way to set the physical path in IIS Web App Deploy, only the virtual path.

Is there a way to do this?

Thanks.

0 Answers
Related