0

私はpowershell経由で空白のスロットスワッピングが実現できないようだと感じました(私は見ることができない、または黙って失敗していますが、スワップされるスロットは、スクリプトに示されているように、2つの非本番スロットの間にあります。成功すると思われる時間の約10%。私がここで間違っていることを誰かに知らせることができればうまくいけば、それはなぜ成功するか失敗するかわからない。Azure Powershell:ウェブサイトのスロットスワップが予想通りに動作しない

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 

答えて

1

について

私はチームシティーでのビルドジョブで実行され、次のようにスクリプトがある私が作ったスクリプトを持っていますそれが成功すると思われる時間の10%。なぜそれが成功するか失敗するかわからない

成功するか失敗するかわからない場合は、私は以下のコードを-Debugモードでテストすることをお勧めします。ここで

Switch-AzureWebsiteSlot -Name FuWebsite -Slot1 Build-Automation -Slot2 Staging -Force -Verbose -Debug 

私は私の側に得る結果である: enter image description here

詳細な情報が解決策を見つけるのに役立ちます。 さらに、swapコマンドを実行すると、サイトは変更されません。 IEセッションとクッキーをきれいにしてからもう一度試してみてください。または、KUDUを使用して元のファイルが変更されたかどうかを確認します。

関連する問題