Mic*_*l B 6 powershell azure azure-web-sites azure-powershell azure-resource-manager
是否可以配置源控制存储库以通过Powershell将代码部署到Azure Web App插槽.(甚至只是主要网站)
理想情况下对于v2/ARM,但我现在愿意考虑任何事情!
我查看了AzureRM.Websites模块中可用的命令,似乎没有任何内容.
PS我知道这可以通过模板,我目前正在寻找纯粹的Powershell命令.
您可以使用“低级”ARM CmdLets 来完成此操作。例如对于主站点:
$props = @{
RepoUrl = $repoUrl
Branch = "master"
}
New-AzureRmResource -ResourceGroupName $ResourceGroupName -ResourceType Microsoft.Web/sites/SourceControls -Name $SiteName/Web -PropertyObject $props -ApiVersion 2015-08-01 -Force
Run Code Online (Sandbox Code Playgroud)
对于插槽(使用相同的$props):
New-AzureRmResource -ResourceGroupName $ResourceGroupName -ResourceType Microsoft.Web/sites/slots/sourcecontrols -Name $SiteName/$SlotName/Web -PropertyObject $props -ApiVersion 2015-08-01 -Force
Run Code Online (Sandbox Code Playgroud)
另请参阅此处的示例辅助方法。那个 set IsManualIntegration = true,适用于您不拥有的存储库,并且需要手动同步。对于持续部署,请IsManualIntegration忽略。
| 归档时间: |
|
| 查看次数: |
223 次 |
| 最近记录: |