首页 文章

Azure Service Fabric持续集成在Visual Studio Team Services中失败(是VSO)

提问于
浏览
5

我尝试设置持续集成,以便在Team Services中的 git push 事件上自动部署我的Azure Service Fabric集群 . 我遵循了基于本指南的Team Services Build Definition和Team Services Release Definition的默认模板:

Set up continuous integration for a Service Fabric application by using Visual Studio Team Services

以下是我的设置:
Build Definition

Release Definition

在大多数情况下,一切都适用于第一次部署 . 之后它会抛出以下错误:

An application with name 'fabric:/<APP>' already exists, its type is '<APP>Type' and version is '1.0.0.20160812.7'. You must first remove the existing application before a new application can be deployed or provide a new name for the application.

从那看起来好像它试图完全重新部署服务而不是仅仅升级服务 . 我搜索了所有设置并尝试创建和重新创建任务但无法解决 .

有没有人遇到过这个?

2 回答

  • 0

    您需要添加或更新发布配置文件以启用升级模式,并在第一次部署成功后使用该配置文件部署Service Fabric .

    要迅速做到这一点,你可以右键点击你的项目,并从Visual Studio选择"Publish",检查"Upgrade the Application"选项,如果需要点击"Configure Upgrade Settings",然后单击“保存 Profiles ”链接,并提交/推变化 .
    enter image description here

  • 14

    虽然有一个公认的答案,但我还是想加入这个帖子 . 在下面的方法中,我们只需要编辑Azure Devops任务 . 希望这对可能遇到相同问题的其他人有用:遇到此问题时,一个简单的解决方法是将构建任务的“高级设置”下的“覆盖行为”更改为“始终” . 但是,还必须注意,如果有可能已经运行的服务 - 所有这些服务都会通过滚动升级进行升级(参见第二张图片) .

    enter image description here

    为确保将滚动升级应用于所有服务,除上述内容外,还要确保升级设置配置如下:

    Upgrade Settings

相关问题