Before deployment script

Michal's Avatar

Michal

30 Jul, 2018 11:33 AM

Hello,

we have multiple environments we deploy to (all of them are web apps on azure). And since sometimes there is a problem with locked files, the deployment fails. I wanted to add script for every environment to first stop the app but "before deploy" script is ran just once before all of the deployments and that's not what we really want since I would have to stop all of them before and I just want to stop the ones that are being deployed to. I found pre-sync deployment command, but i believe it doesn't work with azure web app (or is there some option for it?) since i get this error:

Could not complete an operation with the specified provider ("runCommand") when connecting using the Web Management Service. This can occur if the server administrator has not authorized the user for this operation. runCommand http://go.microsoft.com/fwlink/?LinkId=178034  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER.
So my question is if there is some way to run a script for each environment deployment or if you know some way how to solve the problem with files being locked ("Take ASP.NET application offline during deployment" is enabled)
Warning: An error was encountered when processing operation 'Delete Directory' on 'logs'.
Retrying operation 'Delete' on object dirPath (xxx\logs). Attempt 5 of 5.
  1. Support Staff 1 Posted by Ilya Finkelshte... on 30 Jul, 2018 12:15 PM

    Ilya Finkelshteyn's Avatar

    There are number of options:

    But instead I would recommend to move to Zip push deploy. If you are not using parametrization, nothing should hold you. But if you are using it, you can switch to app settings.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac