首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure Powershell:网站插槽不能正常工作

Azure Powershell:网站插槽不能正常工作
EN

Stack Overflow用户
提问于 2016-09-18 11:01:14
回答 1查看 299关注 0票数 0

我发现通过powershell交换天蓝色插槽似乎是无法实现的(我猜想它给出了一个错误响应,我看不到,或者正在默默地失败,但声称成功)。交换的插槽在两个非生产插槽之间,如脚本所示。大约10%的时间,它似乎成功了。我不知道它为什么会成功或失败,希望有人能说明我在这里做错了什么。

我已经编写了一个脚本,它运行在Teamcity上的一个构建作业上,脚本如下:

代码语言:javascript
复制
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

我得到的唯一日志是:

代码语言:javascript
复制
[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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-19 03:35:44

大约10%的时间,它似乎成功了。我不知道为什么它成功或失败

如果你不确定它是成功还是失败。我建议您使用-Debug模式测试下面的代码。

代码语言:javascript
复制
Switch-AzureWebsiteSlot -Name FuWebsite -Slot1 Build-Automation -Slot2 Staging -Force -Verbose -Debug

这是我站在我这边的结果:

详细的信息将帮助您找到解决方案。在加法中,如果执行交换命令,则站点不会更改。请尝试清理IE会话和cookie,然后再试一次。或者使用KUDU查看原始文件是否被更改。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39556923

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档