Service Fabric VSTS 任务异常行为

Service Fabric VSTS Task weird behavior

我使用 VSTS 为 Azure Service Fabric 中的 4 个服务中的每一个设置了一个 CD 任务。以下是所有 4 个任务的配置(除了它们指向不同服务的不同文件夹):

问题:

1.For 前两个应用程序,即使我检查了 "Skip upgrade for same Type and Version",我注意到任务仍然删除应用程序,注销类型并为相同的应用程序类型和版本重做.以下是示例日志:

2018-01-24T02:48:36.6728272Z Overriding application parameter file specified in publish profile with 'd:\a\r1\a\drop\retail\amd64\RIPP\Deploy\PublishEventApplication\ApplicationParameters\DEV.xml' specified in the VSTS task.
2018-01-24T02:48:39.4305864Z An application with name 'fabric:/PublishEvent' already exists in the cluster with application type 'PublishEvent' and version '6.00.9810c873d83e992c104fdcfb125916caa718500a.0'. Removing it.
2018-01-24T02:48:43.9333176Z Remove application instance succeeded
2018-01-24T02:48:44.3244542Z Application type 'PublishEvent' and version '6.00.9810c873d83e992c104fdcfb125916caa718500a.0' was already registered with the cluster, unregistering it...
2018-01-24T02:48:48.8107130Z Unregister application type succeeded.
2018-01-24T02:48:48.8153978Z Copying application to image store...
2018-01-24T02:48:53.7676773Z Upload to Image Store succeeded
2018-01-24T02:48:53.7694089Z Registering application type...
2018-01-24T02:49:05.0363332Z Register application type succeeded
2018-01-24T02:49:05.0397398Z Removing application package from image store...
2018-01-24T02:49:05.3268514Z Remove application package succeeded
2018-01-24T02:49:05.3283533Z Creating application...

2.For 接下来的两个应用程序,部署失败并出现以下错误:

2018-01-24T02:49:46.7483127Z Overriding application parameter file specified in publish profile with 'd:\a\r1\a\drop\retail\amd64\RIPP\Deploy\StreamReservoirApplication\ApplicationParameters\DEV.xml' specified in the VSTS task.
2018-01-24T02:49:48.2340310Z ##[error]An application with name 'fabric:/streamreservoir' already exists, its type is 'streamreservoir' and version is '6.00.7af146b1e9f1084401198b96d7eaf0cacec455f8.0'. You must first remove the existing application before a new application can be deployed or provide a new name for the application.

我的假设是,对于所有四种服务:

  1. 由于应用程序类型、名称和版本相同,因此应跳过部署。
  2. 如果版本不同,应该升级应用程序(而不是删除和重新添加)。
  3. 最后,仅当名称和类型不同时,才应删除旧的并添加新的。
  • 尝试检查 'Override all publish profile upgrade settings' 以配置升级设置。

  • 或者,如您所说:
    另一种选择是直接在发布配置文件中使用设置。因此,简单地检查 "Skip upgrade for same type and version" 不会执行任何操作,除非您覆盖了升级设置或在发布配置文件中设置了升级设置