0
我發現通過PowerShell的Azure插槽交換似乎是不可實現的(我想它是給出了一個錯誤響應,我看不到或者正在默默失敗,但聲稱成功)。如腳本中所示,正在交換的插槽位於兩個非生產插槽之間。大約10%的時間似乎成功。我不知道爲什麼它成功或失敗,希望有人能夠澄清我在這裏做錯了什麼。Azure Powershell:網站插槽交換不能正常工作
我有我做了一個腳本,對TeamCity的構建作業運行和腳本如下:
param ([string]$publishFilePath = "%system.teamcity.build.checkoutDir%\3.
deployment\Fu.publishsettings")
Import-AzurePublishSettingsFile $publishFilePath;
Select-AzureSubscription "Visual Studio Professional with MSDN";
Set-AzureSubscription -SubscriptionName "Visual Studio Professional with MSDN";
Switch-AzureWebsiteSlot -Name FuWebsite -Slot1 Build-Automation -Slot2 Staging -Force -Verbose
Switch-AzureWebsiteSlot -Name FuServices -Slot1 Build-Automation -Slot2 Staging -Force -Verbose
唯一的日誌我得到的是:
[10:20:12][Step 5/5] VERBOSE: Performing the operation "Swapping website
production slot ..." on
[10:20:12][Step 5/5] target "FuWebsite".
[10:21:16][Step 5/5] VERBOSE: Performing the operation "Swapping website production slot ..." on
[10:21:16][Step 5/5] target "FuMeServices".
[10:22:19][Step 5/5]
[10:22:19][Step 5/5]
[10:22:19][Step 5/5] Process exited with code 0