AppCenterDistribute@3 - App Center 分发 v3 任务

使用此任务通过 Visual Studio App Center 将应用生成分发给测试人员和用户。

语法

# App Center distribute v3
# Distribute app builds to testers and users via Visual Studio App Center.
- task: AppCenterDistribute@3
  inputs:
    serverEndpoint: # string. Required. App Center service connection. 
    appSlug: # string. Required. App slug. 
    appFile: # string. Alias: app. Required. Binary file path. 
    #buildVersion: # string. Build version. 
    releaseNotesOption: 'input' # 'input' | 'file'. Alias: releaseNotesSelection. Required. Create release notes. Default: input.
    releaseNotesInput: # string. Required when releaseNotesSelection = input. Release notes. 
    #releaseNotesFile: # string. Required when releaseNotesSelection = file. Release notes file. 
    #isMandatory: false # boolean. Require users to update to this release. Default: false.
    destinationType: 'groups' # 'groups' | 'store'. Required. Release destination. Default: groups.
    #distributionGroupId: # string. Alias: destinationGroupIds. Optional. Use when destinationType = groups. Destination IDs. 
    #destinationStoreId: # string. Required when destinationType = store. Destination ID. 
    #isSilent: # boolean. Optional. Use when destinationType = groups. Do not notify testers. Release will still be available to install. 
  # Symbols
    #symbolsOption: 'Apple' # 'Apple' | 'Android' | 'UWP'. Alias: symbolsType. Symbols type. Default: Apple.
    #symbolsPath: # string. Optional. Use when symbolsType == AndroidNative || symbolsType = Windows. Symbols path. 
    #appxsymPath: # string. Optional. Use when symbolsType = UWP. Symbols path (*.appxsym). 
    #symbolsDsymFiles: # string. Alias: dsymPath. Optional. Use when symbolsType = Apple. dSYM path. 
    #symbolsMappingTxtFile: # string. Alias: mappingTxtPath. Optional. Use when symbolsType = Android. Mapping file. 
    #nativeLibrariesPath: # string. Optional. Use when symbolsType == Android. Native Library File Path. 
    #symbolsIncludeParentDirectory: # boolean. Alias: packParentFolder. Optional. Use when symbolsType = Apple. Include all items in parent folder.

输入

serverEndpoint - App Center 服务连接
string。 必填。

选择 Visual Studio App Center 的服务连接。 若要创建一个,请单击 Manage 链接并创建新的服务连接。


appSlug - App slug
string。 必填。

应用 slug 采用 {username}/{app_identifier}格式。 若要查找应用的 {username}{app_identifier},请单击 App Center中的名称,生成的 URL 采用 https://appcenter.ms/users/**{username}**/apps/**{app_identifier}**格式。 如果使用组织,则应用 slug 的格式 {orgname}/{app_identifier}


appFile - 二进制文件路径
输入别名:appstring。 必填。

从存储库根目录到要发布的 APK/AAB 或 IPA 文件的相对路径。


buildVersion - 生成版本
string

上传二进制文件的生成版本,需要为 .zip.msi指定。 除非平台为 WPF 或 WinForms,否则将忽略此值。


symbolsOption - 符号类型
输入别名:symbolsTypestring。 允许的值:AppleAndroidUWP。 默认值:Apple

包括用于在 App Center 诊断中接收符号化堆栈跟踪的符号文件。


symbolsPath - 符号路径
string。 可选。 当 symbolsType == AndroidNative || symbolsType = Windows时使用。

存储库根目录到符号文件夹的相对路径。


appxsymPath - 符号路径 (*.appxsym)
string。 可选。 当 symbolsType = UWP时使用。

APPXSYM 符号文件的相对路径。 路径可能包含通配符


symbolsDsymFiles - dSYM 路径
输入别名:dsymPathstring。 可选。 当 symbolsType = Apple时使用。

存储库根目录到 dSYM 文件夹的相对路径。 路径可能包含通配符


symbolsMappingTxtFile - 映射文件
输入别名:mappingTxtPathstring。 可选。 当 symbolsType = Android时使用。

从存储库根目录到 Android mapping.txt 文件的相对路径。


nativeLibrariesPath - 本机库文件路径
string。 可选。 当 symbolsType == Android时使用。

从存储库根目录到要发布的其他本机库的相对路径(例如 .so 文件)。


symbolsIncludeParentDirectory - 在父文件夹中包括所有项目
输入别名:packParentFolderboolean。 可选。 当 symbolsType = Apple时使用。

上传所选符号文件或文件夹以及同一父文件夹中的所有其他项目。 这是 React Native 应用所必需的。


releaseNotesOption - 创建发行说明
输入别名:releaseNotesSelectionstring。 必填。 允许的值:input(输入发行说明)、file(选择发行说明文件)。 默认值:input

发行说明将附加到该版本,并显示在安装页上的测试人员。


releaseNotesInput - 发行说明
stringreleaseNotesSelection = input时是必需的。

此版本的发行说明。


releaseNotesFile - 发行说明文件
stringreleaseNotesSelection = file时是必需的。

选择包含此版本的发行说明的 UTF-8 编码文本文件。


isMandatory - 要求用户更新到此版本
boolean。 默认值:false

应用中心分发 SDK 要求进行更新。 系统会自动提示测试人员更新。


destinationType - 发布目标
string。 必填。 允许的值:groupsstore。 默认值:groups

每个版本都分发给组或存储区。


distributionGroupId - 目标 ID
输入别名:destinationGroupIdsstring。 可选。 当 destinationType = groups时使用。

将接收生成版本的通讯组的 ID。 将它留空以使用默认组,并使用逗号或分号分隔多个 ID。


destinationStoreId - 目标 ID
stringdestinationType = store时是必需的。

将接收生成版本的分发存储的 ID。


isSilent - 不要通知测试人员。版本仍可供安装。
boolean。 可选。 当 destinationType = groups时使用。

测试人员不会收到新版本的电子邮件。


任务控制选项

除任务输入之外,所有任务都具有控制选项。 有关详细信息,请参阅 控件选项和常见任务属性

输出变量

没有。

注解

使用此任务通过 App Center 将应用生成分发给测试人员和用户。

例子

此示例管道生成 Android 应用,运行测试,并使用 App Center Distribute 发布应用。

# Android
# Build your Android project with Gradle.
# Add steps that test, sign, and distribute the APK, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/pipelines/ecosystems/android

pool:
  vmImage: 'macOS-latest'
steps:

- script: sudo npm install -g appcenter-cli
- script: appcenter login --token {YOUR_TOKEN}

- task: Gradle@2
  inputs:
    workingDirectory: ''
    gradleWrapperFile: 'gradlew'
    gradleOptions: '-Xmx3072m'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'
    tasks: build

- task: CopyFiles@2
  inputs:
    contents: '**/*.apk'
    targetFolder: '$(build.artifactStagingDirectory)'

- task: PublishBuildArtifacts@1
  inputs:
    pathToPublish: '$(build.artifactStagingDirectory)'
    artifactName: 'outputs'
    artifactType: 'container'

# Run tests using the App Center CLI
- script: appcenter test run espresso --app "{APP_CENTER_SLUG}" --devices "{DEVICE}" --app-path {APP_FILE} --test-series "master" --locale "en_US" --build-dir {PAT_ESPRESSO} --debug

# Distribute the app
- task: AppCenterDistribute@3
  inputs:
    serverEndpoint: 'AppCenter'
    appSlug: '$(APP_CENTER_SLUG)'
    appFile: '$(APP_FILE)' # Relative path from the repo root to the APK or IPA file you want to publish
    symbolsOption: 'Android'
    releaseNotesOption: 'input'
    releaseNotesInput: 'Here are the release notes for this version.'
    destinationType: 'groups'

要求

要求 说明
管道类型 YAML,经典版本,经典版本
运行时间 代理,DeploymentGroup
需求 没有
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任何
Settable 变量 任何
代理版本 2.206.1 或更高版本
任务类别 部署
要求 说明
管道类型 YAML,经典版本,经典版本
运行时间 代理,DeploymentGroup
需求 没有
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任何
Settable 变量 任何
代理版本 2.144.0 或更高版本
任务类别 部署
要求 说明
管道类型 YAML,经典版本,经典版本
运行时间 代理,DeploymentGroup
需求 没有
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任何
Settable 变量 任何
代理版本 所有支持的代理版本。
任务类别 部署