2

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)

4

2 回答 2

2

一些“站点扩展”在 Azure 中重新配置了这种行为。

例如,如果您在 PHP 网站中使用 Composer Site Extension,默认的 kudu 部署脚本会被 Composer Site Extension 注入的其他脚本替换。

也许这可能是你的情况。

查看您的 COMMAND 环境变量。

于 2015-05-29T06:34:14.267 回答
0

我做同样的事情,但我使用 SCM_POST_DEPLOYMENT_ACTIONS_PATH 而不是 POST_DEPLOYMENT_ACTION_DIR,这可能是问题吗?

[config]
SCM_POST_DEPLOYMENT_ACTIONS_PATH = deployment\postdeployactions\
于 2016-05-02T14:46:51.173 回答