我正在尝试将 IPA 发布到 App Center,我的构建定义的 YAML 如下:
# Xcode
# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode
pool:
vmImage: 'macOS-10.13'
trigger: none
variables:
- name: SDK
value: iphoneos
- name: Configuration
value: ReleasePPD
steps:
- task: DeleteFiles@1
inputs:
SourceFolder: '$(system.defaultWorkingDirectory)'
Contents: 'AuraApp.xcworkspace'
- task: CocoaPods@0
inputs:
forceRepoUpdate: false
displayName: 'pod install using the CocoaPods task'
- task: InstallAppleCertificate@2
inputs:
certSecureFile: 'ios_distribution.p12'
- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles' # Options: secureFiles, sourceRepository
provProfileSecureFile: 'Aura_PPD_Distribution_Profile.mobileprovision'
removeProfile: true
- task: Xcode@5
inputs:
xcWorkspacePath: '$(system.defaultWorkingDirectory)/AuraApp.xcworkspace'
actions: 'build'
sdk: $(SDK)
configuration: $(Configuration)
xcodeVersion: '10' # Options: 8, 9, 10, default, specifyPath
exportPath: '$(Build.ArtifactStagingDirectory)/PPD'
packageApp: true
#exportMethod: 'package'
exportOptions: 'auto'
#exportOptionsPlist: ''
scheme: 'Aura PPD'
signingOption: manual
signingIdentity: $(APPLE_CERTIFICATE_SIGNING_IDENTITY)
provisioningProfileUuid: $(APPLE_PROV_PROFILE_UUID)
- task: AppCenterDistribute@1
inputs:
serverEndpoint: 'Azure App Center'
appSlug: aurafoundation/Aura
appFile: $(Build.ArtifactStagingDirectory)/**/*.ipa
releaseNotesOption: 'input'
releaseNotesInput: 'Test'
Xcode 构建任务似乎运行良好:
##[debug]exec tool: /usr/bin/xcodebuild
##[debug]arguments:
##[debug] -exportArchive
##[debug] -archivePath
##[debug] /Users/vsts/agent/2.146.0/work/1/s/Aura PPD.xcarchive
##[debug] -exportPath
##[debug] /Users/vsts/agent/2.146.0/work/1/a/PPD
##[debug] -exportOptionsPlist
##[debug] _XcodeTaskExportOptions.plist
[command]/usr/bin/xcodebuild -exportArchive -archivePath /Users/vsts/agent/2.146.0/work/1/s/Aura PPD.xcarchive -exportPath /Users/vsts/agent/2.146.0/work/1/a/PPD -exportOptionsPlist _XcodeTaskExportOptions.plist | /usr/local/lib/ruby/gems/2.6.0/bin/xcpretty --no-color
2019-02-12 11:03:58.404 xcodebuild[1595:20747] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/Aura PPD_2019-02-12_11-03-58.402.xcdistributionlogs'.
▸ Export Succeeded
##[debug]success of first tool:true
##[debug]rc:0
##[debug]success:true
##[debug]task result: Succeeded
##[debug]Processed: ##vso[task.complete result=Succeeded;]Xcode task execution completed with no errors.
##[debug]Agent.Version=2.146.0
##[debug]Processed: ##vso[telemetry.publish area=TaskHub;feature=Xcode]{"xcodeVersionSelection":"10","actions":["build"],"packageApp":true,"xcodeVersion":"10.1","signingOption":"manual","exportOptions":"auto"}
##[section]Finishing: Xcode
根据 -exportPath 参数,生成的 IPA 文件应位于 /Users/vsts/agent/2.146.0/work/1/a/PPD 中。
但 !AppCenterDistribute 步骤失败:
##[section]Starting: AppCenterDistribute
==============================================================================
Task : App Center Distribute
Description : Distribute app builds to testers and users via App Center
Version : 1.147.0
Author : Microsoft Corporation
Help : For help with this task, visit the Visual Studio App Center [support site](https://aka.ms/appcentersupport/).
==============================================================================
##[error]Error: Cannot find any file based on /Users/vsts/agent/2.146.0/work/1/a/**/*.ipa.
##[section]Finishing: AppCenterDistribute
所以问题是:我的 .ipa 在哪里?为什么我在 exportPath 中找不到我的 .ipa ?
编辑 :
我更改了 exportPath 参数以指定完整路径:Users/vsts/agent/2.146.0/work/1/a/PPD/Aura.ipa
现在我在 AppCenter 分发任务上遇到另一个错误:
##[debug]found 1 paths
##[debug]applying include pattern
##[debug]1 matches
##[debug]1 final results
##[debug]....... selectedPaths: /Users/vsts/agent/2.146.0/work/1/s
##[debug]....... uniquePaths: /Users/vsts/agent/2.146.0/work/1/s
##[debug]-- Prepare symbols
##[debug]-- Prepare for uploading release.
##[debug]---- url: https://api.appcenter.ms/v0.1/apps/aurafoundation/Aura/release_uploads
##[debug]---- "{\"upload_id\":\"a349d7a0-10f2-0137-9dfa-12f79a9ee306\",\"upload_url\":\"https://rink.hockeyapp.net/api/sonoma/apps/a761af0d-7844-46a9-bf7b-701fa1db6b9c/app_versions/upload?upload_id=a349d7a0-10f2-0137-9dfa-12f79a9ee306\"}"
##[debug]---- http call status code: 201
##[debug]-- Uploading release...
##[debug]---- url: https://rink.hockeyapp.net/api/sonoma/apps/a761af0d-7844-46a9-bf7b-701fa1db6b9c/app_versions/upload?upload_id=a349d7a0-10f2-0137-9dfa-12f79a9ee306
##[debug]---- Failed with error: Error: form-data: EISDIR: illegal operation on a directory, read
##[debug]task result: Failed
##[error]Error: form-data: EISDIR: illegal operation on a directory, read
##[debug]Processed: ##vso[task.issue type=error;]Error: form-data: EISDIR: illegal operation on a directory, read
##[debug]Processed: ##vso[task.complete result=Failed;]Error: form-data: EISDIR: illegal operation on a directory, read
##[section]Finishing: AppCenterDistribute