Muokkaa

Jaa


AppCenterDistribute@3 - App Center distribute v3 task

Use this task to distribute app builds to testers and users via Visual Studio App Center.

Syntax

# 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.
# 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. 
    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'. Alias: symbolsType. Symbols type. Default: Apple.
    #symbolsPath: # string. Optional. Use when symbolsType == AndroidNative || symbolsType = Windows. Symbols path. 
    #symbolsPdbFiles: '**/*.pdb' # string. Alias: pdbPath. Optional. Use when symbolsType = UWP. Symbols path (*.pdb). Default: **/*.pdb.
    #symbolsDsymFiles: # string. Alias: dsymPath. Optional. Use when symbolsType = Apple. dSYM path. 
    #symbolsMappingTxtFile: # string. Alias: mappingTxtPath. Optional. Use when symbolsType = Android. Mapping file. 
    #symbolsIncludeParentDirectory: # boolean. Alias: packParentFolder. Optional. Use when symbolsType = Apple. Include all items in parent folder.

Inputs

serverEndpoint - App Center service connection
string. Required.

Selects the service connection for Visual Studio App Center. To create one, click the Manage link and create a new service connection.


appSlug - App slug
string. Required.

The app slug is in the format of {username}/{app_identifier}. To locate {username} and {app_identifier} for an app, click on its name from App Center, and the resulting URL is in the format of https://appcenter.ms/users/**{username}**/apps/**{app_identifier}**. If you are using orgs, the app slug is of the format {orgname}/{app_identifier}.


appFile - Binary file path
Input alias: app. string. Required.

The relative path from the repo root to the APK/AAB or IPA file you want to publish.


buildVersion - Build version
string.

The build version of the uploading binary which needs to be specified for .zip and .msi. This value will be ignored unless the platform is WPF or WinForms.


symbolsOption - Symbols type
Input alias: symbolsType. string. Allowed values: Apple, Android, UWP. Default value: Apple.

Includes symbol files to receive symbolicated stack traces in App Center Diagnostics.


symbolsOption - Symbols type
Input alias: symbolsType. string. Allowed values: Apple, Android. Default value: Apple.

Includes symbol files to receive symbolicated stack traces in App Center Diagnostics.


symbolsPath - Symbols path
string. Optional. Use when symbolsType == AndroidNative || symbolsType = Windows.

The relative path from the repo root to the symbols folder.


appxsymPath - Symbols path (*.appxsym)
string. Optional. Use when symbolsType = UWP.

The relative path to the APPXSYM symbols file. Path may contain wildcards.


symbolsDsymFiles - dSYM path
Input alias: dsymPath. string. Optional. Use when symbolsType = Apple.

The relative path from the repo root to dSYM folder. Path may contain wildcards.


symbolsMappingTxtFile - Mapping file
Input alias: mappingTxtPath. string. Optional. Use when symbolsType = Android.

The relative path from the repo root to Android's mapping.txt file.


nativeLibrariesPath - Native Library File Path
string. Optional. Use when symbolsType == Android.

The relative path from the repo root to the additional native libraries you want to publish (e.g. .so files).


symbolsIncludeParentDirectory - Include all items in parent folder
Input alias: packParentFolder. boolean. Optional. Use when symbolsType = Apple.

Uploads the selected symbols file or folder and all other items inside the same parent folder. This is required for React Native apps.


releaseNotesOption - Create release notes
Input alias: releaseNotesSelection. string. Required. Allowed values: input (Enter Release Notes), file (Select Release Notes File). Default value: input.

The release notes will be attached to the release and shown to testers on the installation page.


releaseNotesInput - Release notes
string. Required when releaseNotesSelection = input.

The release notes for this version.


releaseNotesFile - Release notes file
string. Required when releaseNotesSelection = file.

Selects a UTF-8 encoded text file which contains the release notes for this version.


isMandatory - Require users to update to this release
boolean. Default value: false.

The App Center Distribute SDK required to mandate an update. Testers are automatically prompted to update.


destinationType - Release destination
string. Required. Allowed values: groups, store. Default value: groups.

Each release is distributed to either groups or a store.


distributionGroupId - Destination IDs
Input alias: destinationGroupIds. string. Optional. Use when destinationType = groups.

The IDs of the distribution groups who will receive the build release. Leave it empty to use the default group, and use commas or semicolons to separate multiple IDs.


destinationStoreId - Destination ID
string. Required when destinationType = store.

The IDs of the distribution store that will receive the build release.


isSilent - Do not notify testers. Release will still be available to install.
boolean. Optional. Use when destinationType = groups.

Testers do not receive an email for new releases.


symbolsPdbFiles - Symbols path (*.pdb)
Input alias: pdbPath. string. Optional. Use when symbolsType = UWP. Default value: **/*.pdb.

The relative path from the repo root to PDB symbols files. Path may contain wildcards.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to distribute app builds to testers and users through App Center.

Examples

This example pipeline builds an Android app, runs tests, and publishes the app using 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'

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.206.1 or greater
Task category Deploy
Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.144.0 or greater
Task category Deploy
Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version All supported agent versions.
Task category Deploy