mew*_*ahl 5 azure azure-cli azure-web-app-service
我正在按照本指南创建一个带有自定义deploy.cmd文件的Web应用程序.文章建议我可以deploy.cmd使用以下命令获取当前文件的副本(我将随后修改):
azure site deploymentscript --python
不幸的是,当我使用文章中链接的MSI安装Azure CLI时azure,我的路径上没有二进制文件.我有az- 这是同一个CLI的新版本吗? - 但我找不到该可执行文件的等效部署脚本生成命令.
我找到了一个deploy.cmd使用Kudu(下D:\home\site\deployments\tools)的文件,但我不确定这是否是适当的文件.任何人都可以为部署脚本生成建议正确的Azure CLI命令,或者确认deploy.cmd我找到的文件是正确的修改?提前致谢!
根据我的知识,没有相当于azure site deploymentscript天蓝色的cli(2.0).因此,您无法使用Azure CLI 2.0部署自定义脚本.
您最好知道Azure cli 2.0(az)与Azure cli 1.0(azure)之间的区别.
Azure CLI 2.0:我们用Python编写的下一代CLI,用于Resource Manager部署模型.
Azure CLI 1.0:我们使用Node.js编写的CLI,用于经典和资源管理器部署模型.
对于您的方案,如果您可以安装Azure ClI 1.0,则可以参考此链接来安装Azure CLI 1.0.
除了使用命令行生成启动器部署脚本之外,还有一种替代方法通常更容易:
更多信息请参考此链接.
您可以使用kuduscript生成部署脚本。
npm install -g kuduscript
kuduscript --python
Run Code Online (Sandbox Code Playgroud)
这是选项列表
Options:
-h, --help output usage information
-V, --version output the version number
-r, --repositoryRoot [dir path] The root path for the repository (default: .)
--aspWAP <projectFilePath> Create a deployment script for .NET web application, specify the project file path
--aspNetCore <projectFilePath> Create a deployment script for ASP.NET Core web application, specify the project file path
--aspWebSite Create a deployment script for basic website
--go Create a deployment script for Go website
--node Create a deployment script for node.js website
--ruby Create a deployment script for ruby website
--php Create a deployment script for php website
--python Create a deployment script for python website
--functionApp [projectFilePath] Create a deployment script for function App, specify the project file path if using msbuild
--basic Create a deployment script for any other website
--dotNetConsole <projectFilePath> Create a deployment script for .NET console application, specify the project file path
-s, --solutionFile <file path> The solution file path (sln)
-p, --sitePath <directory path> The path to the site being deployed (default: same as repositoryRoot)
-t, --scriptType <batch|bash|posh> The script output type (default: batch)
-o, --outputPath <output path> The path to output generated script (default: same as repository root)
-y, --suppressPrompt Suppresses prompting to confirm you want to overwrite an existing destination file.
--no-dot-deployment Do not generate the .deployment file.
--no-solution Do not require a solution file path (only for --aspWAP otherwise ignored).
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1761 次 |
| 最近记录: |