0

PowerShell を介した Azure スロット スワッピングが現実的ではないように思われることがわかりました (表示できないエラー応答を返しているか、静かに失敗しているが成功を主張していると思います)。スワップされるスロットは、スクリプトに示されているように、2 つの非運用スロットの間にあります。約 10% の確率で成功するようです。なぜ成功するのか失敗するのかはわかりません。うまくいけば、誰かが私がここで間違っていることに光を当てることができます。

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
4

1 に答える 1