首页 > 解决方案 > 流量管理器部署

问题描述

我创建了一个流量管理器配置文件以部署在我的测试环境中。它是这样的:

$TmProfile = New-AzTrafficManagerProfile -Name " " -ResourceGroupName " " -TrafficRoutingMethod Priority -RelativeDnsName " " -Ttl " " -MonitorProtocol TCP -MonitorPort " " -MonitorPath "/"

Add-AzTrafficManagerEndpointConfig -EndpointName VM-"" -TrafficManagerProfile $TmProfile -Type ExternalEndpoints -Target ""  -EndpointStatus Enabled -Priority 1
Add-AzTrafficManagerEndpointConfig -EndpointName VM-"" -TrafficManagerProfile $TmProfile -Type ExternalEndpoints -Target ""  -EndpointStatus Enabled -Priority 2
Set-AzTrafficManagerProfile -TrafficManagerProfile $TmProfile

Disable-AzTrafficManagerEndpoint -Name "VM- " -ProfileName $TmProfile -ResourceGroupName "" -Type ExternalEndpoints -Force

我在 azure 管道中使用了 ps 任务,并且管道成功执行。但是,我无法将它部署到我的天蓝色环境中。我需要使用什么任务将其发布到天蓝色。此外,“发布构建工件”不起作用,因为此 powershell 脚本没有生成工件。

请帮助我进行部署部分。谢谢:):)

标签: azure-devopstaskazure-traffic-manager

解决方案


您可以尝试使用 azure powershell task 。使用此任务在 azure 环境中运行 powershell 脚本。

在此处输入图像描述

这是供参考的文件。


推荐阅读