【问题标题】:Where to get Azure Pipeline AppCenterDistribute@3 Task destinationStoreId?从哪里获取 Azure Pipeline AppCenterDistribute@3 任务destinationStoreId?
【发布时间】:2020-01-13 00:10:46
【问题描述】:

我正在我们的 Azure DevOps 管道中创建一个自动分发到我们的 AppCenter,以自动发布到 Google Play 商店。

我们管道中的自动分发到 AppCenter 组的工作正常,如下所示:

- task: AppCenterDistribute@3
  inputs:
    serverEndpoint: 'AppCenter'
    appSlug: 'mycompany/appname'
    appFile: '**/android/bin/nl.mycompany.appname.apk'
    symbolsOption: 'Android'
    releaseNotesOption: 'input'
    releaseNotesInput: 'some comment'
    destinationType: 'groups'
    distributionGroupId: '813c4695-5f9c-4b10-973e-7awdcsd6'

但我无法通过 AppCenter 分发到商店:

- task: AppCenterDistribute@3
  inputs:
    serverEndpoint: 'AppCenter'
    appSlug: 'mycompany/appname'
    appFile: '**/android/bin/nl.mycompany.appname.apk'
    symbolsOption: 'Android'
    releaseNotesOption: 'input'
    releaseNotesInput: 'some comment'
    destinationType: 'store'
    destinationStoreId: 'Alpha'

这会返回:

错误:ID 为 Alpha 的分发存储不存在。

知道在 AppCenter 或其他地方的哪里可以找到 destinationStoreId 吗?

【问题讨论】:

    标签: azure-devops yaml azure-pipelines google-play-console visual-studio-app-center


    【解决方案1】:

    记录在案 here:

    使用 API 调用获取 Store 连接 ID;在文档的其他地方了解how to use the App Center API

    使用以下链接调用 API:https://openapi.appcenter.ms/#/distribute/stores_list 用于使用 .下面是从 API 调用返回的结果示例。您将使用键 ID 的值将商店指定为目标。

    [
      {"id":"ebb146bc-b0d7-4500-9791-fc02f191bff9",
      "name":"Alpha team",
      "type":"apple",
      "track":"testflight-external",
      "created_by":"5114c905-76db-49e5-8a47-58c34b33a38b",
      "service_connection_id":"2a85ad1e-b44e-d6fd-a85f-8daee62b54ed"},
      {"id":"10ba5942-1388-4b2a-869a-9de40d5c0cff",
      "name":"Production",
      "type":"apple",
      "track":"production",
      "created_by":"5114c905-76db-49e5-8a47-58c34b33a38b",
      "service_connection_id":"2a85ad1e-b44e-d6fd-a85f-8daee62b54ed"},
      {"id":"894dd821-9f16-44a3-b2a7-d513d226babb",
      "name":"iTunes Connect users",
      "type":"apple",
      "track":"testflight-internal",
      "created_by":"5114c905-76db-49e5-8a47-58c34b33a38b",
      "service_connection_id":"2a85ad1e-b44e-d6fd-a85f-8daee62b54ed"}
    ]
    

    还要检查那些 GitHub 问题:

    https://github.com/microsoftdocs/vsts-docs/issues/5128

    https://github.com/MicrosoftDocs/vsts-docs/issues/3997

    https://github.com/microsoft/azure-pipelines-tasks/issues/10158

    【讨论】:

    • 哇,记录在案但很难发现。谢谢!
    • distribute/stores_list 仅指向文档。要使用 API,请调用 https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/distribution_stores,并在标头中设置您的 api 令牌。
    猜你喜欢
    • 2020-07-27
    • 1970-01-01
    • 1970-01-01
    • 2020-06-11
    • 1970-01-01
    • 1970-01-01
    • 2020-10-05
    • 1970-01-01
    • 2020-07-18
    相关资源
    最近更新 更多