通过 Azure DevOps 构建 Ionic Cordova iOS 应用程序

3
有人知道如何将Azure DevOps CI与ionic cordova ios应用程序一起使用吗?
我尝试了以下步骤:
  • Npm安装
  • Ionic命令(命令:ionic cordova build ios)
  • 列出项目
  • 安装苹果证书
  • 安装苹果配置文件
  • Xcode构建
  • 发布到应用商店(从市场安装)
Xcode构建会出现以下错误。
2020-05-06T22:29:39.9577800Z ##[section]Starting: Xcode build
2020-05-06T22:29:39.9594120Z ==============================================================================
2020-05-06T22:29:39.9594470Z Task         : Xcode
2020-05-06T22:29:39.9594850Z Description  : Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
2020-05-06T22:29:39.9595210Z Version      : 5.152.0
2020-05-06T22:29:39.9595490Z Author       : Microsoft Corporation
2020-05-06T22:29:39.9595850Z Help         : https://learn.microsoft.com/azure/devops/pipelines/tasks/build/xcode
2020-05-06T22:29:39.9596310Z ==============================================================================
2020-05-06T22:29:48.0466510Z ##[warning]Multiple Xcode workspace matches were found. The first match will be used: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/App.xcodeproj/project.xcworkspace
2020-05-06T22:29:48.0482290Z [command]/usr/bin/xcodebuild -workspace /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/App.xcodeproj/project.xcworkspace -list
2020-05-06T22:29:53.0861170Z Information about workspace "App":
2020-05-06T22:29:53.0861630Z     Schemes:
2020-05-06T22:29:53.0866440Z         App
2020-05-06T22:29:53.0866690Z 
2020-05-06T22:29:53.1010390Z The workspace contains a single shared scheme. 'App' will be used.
2020-05-06T22:29:53.1033230Z [command]/usr/bin/xcodebuild -version
2020-05-06T22:29:53.2107930Z Xcode 10.3
2020-05-06T22:29:53.2127580Z Build version 10G8
2020-05-06T22:29:53.2275010Z [command]/usr/bin/xcodebuild -sdk iphonesimulator12.4 -configuration Release -workspace /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/App.xcodeproj/project.xcworkspace -scheme App build CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=XXXX | /usr/local/lib/ruby/gems/2.6.0/bin/xcpretty -r junit --no-color
2020-05-06T22:29:54.8861040Z 
2020-05-06T22:29:54.8863380Z ⌠ error: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig: unable to open file (in target "App" in project "App") (in target 'App')
2020-05-06T22:29:54.8864420Z 
2020-05-06T22:29:54.8866300Z 
2020-05-06T22:29:54.8868760Z 
2020-05-06T22:29:54.8871220Z ⌠ error: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig: unable to open file (in target "App" in project "App") (in target 'App')
2020-05-06T22:29:54.8872120Z 
2020-05-06T22:29:54.8872340Z 
2020-05-06T22:29:54.8878940Z 
2020-05-06T22:29:54.8880320Z ⌠ error: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig: unable to open file (in target "App" in project "App") (in target 'App')
2020-05-06T22:29:54.8880960Z 
2020-05-06T22:29:54.8881090Z 
2020-05-06T22:29:54.8891460Z ** BUILD FAILED **
2020-05-06T22:29:54.8892100Z 
2020-05-06T22:29:54.9074960Z ##[error]Error: /usr/bin/xcodebuild failed with return code: 65
2020-05-06T22:29:54.9432910Z ##[section]Finishing: Xcode build

2个回答

1

太好了!感谢您在这里分享您的解决方案,您可以将其接受为答案,以便帮助其他遇到相同问题的社区成员,并且我们可以归档此线程,谢谢。 - LoLance
@user10056111,我想看看你的构建定义。如果您能提供图片,那将非常有帮助。 - wmehanna

0

可以为iOS和Android构建Azure Devops Pipeline。您需要:

  1. 安装Node JS
  2. 安装Ionic
  3. 调用ionic capacitor sync
  4. Cocoapods Install任务添加到您的工作目录中
  5. 配置您的项目路径
  6. 构建iOS或Android

对于那些寻找YAML模板的人,请在这里找到详细版本。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接