Kudu post-deployment commands not running

烈酒焚心 提交于 2019-12-11 03:13:17

问题


I'm trying to run some scripts after my site is deployed to azure (via kudu)

I have the following directory structure

-solution
  - .deployment
  - deploy.cmd 
    - deployment
       - postdeployactions
         - test.bat

.deployment looks like this:

[config]
POST_DEPLOYMENT_ACTION_DIR  = deployment\postdeployactions\
command = deploy.cmd

deploy.cmd is unmodified from the one generated by azure site deploymentscript --aspWAP pathToYourWebProjectFile.csproj -s pathToYourSolutionFile.sln (http://blog.amitapple.com/post/38418009331/azurewebsitecustomdeploymentpart2/#.VPYd_PmUeTI)

However test.bat is not getting called.

I have tried setting both POST_DEPLOYMENT_ACTION_DIR and SCM_POST_DEPLOYMENT_ACTIONS_PATH (see https://github.com/projectkudu/kudu/issues/1154)


回答1:


Some "Site Extensions" reconfigure this behaviour inside Azure.

For example, if you use Composer Site Extension in a PHP Web Site, default kudu deployment script is replaced by other script injected by Composer Site Extension.

Maybe this could be your case.

Look at your COMMAND environment variable.




回答2:


I do exactly the same thing but instead of POST_DEPLOYMENT_ACTION_DIR I use SCM_POST_DEPLOYMENT_ACTIONS_PATH, could that be the issue?

[config]
SCM_POST_DEPLOYMENT_ACTIONS_PATH = deployment\postdeployactions\


来源:https://stackoverflow.com/questions/28843109/kudu-post-deployment-commands-not-running

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!