Service Fabric VSTS任务奇怪的行为

时间:2018-01-24 03:07:28

标签: azure-devops azure-service-fabric azure-pipelines-release-pipeline

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

enter image description here

问题:

1.对于前两个应用程序,即使我已检查"跳过同一类型和版本"的升级,我注意到该任务仍然删除了该应用程序,取消注册该类型并重新为其重做相同的应用类型和版本。以下是示例日志:

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.对于接下来的两个应用程序,部署失败并出现以下错误:

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. 最后,只有当名称和类型不同时,才应删除旧版本,并添加新版本。

1 个答案:

答案 0 :(得分:0)

  • 尝试检查'覆盖所有发布配置文件升级设置'配置升级设置。

  • 或者,正如你所说:
    另一种选择是直接在发布配置文件中使用这些设置。因此,只需检查"跳过相同类型和版本的升级"除非您已覆盖升级设置或在发布配置文件中执行任何操作,否则不会执行任何操作