我正在使用用于 React 原生应用程序的 CICD 的 azure 管道。我使用 macOS Big Sur (11.4) 和 Xcode 12.4 作为本地机器来创建和测试应用程序。应用程序在本地机器上运行良好,没有任何警告或 ios 问题。但是,当我在 Azure 管道上推送代码时,它给了我如下错误,
2021-07-27T07:16:59.6470190Z ▸ Building library libRCTTypeSafety.a
2021-07-27T07:17:00.2028870Z ▸ Running script '[CP-User] Generate Specs'
2021-07-27T07:17:01.2282870Z ** BUILD FAILED **
2021-07-27T07:17:01.2284310Z
2021-07-27T07:17:01.2284960Z
2021-07-27T07:17:01.2285770Z The following build commands failed:
2021-07-27T07:17:01.2288070Z PhaseScriptExecution [CP-User] Generate\ Specs /Users/runner/Library/Developer/Xcode/DerivedData/QualityGateTest-fpifffctlauicvdetlisjqinofwg/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/FBReactNativeSpec.build/Script-650A047D1ACF74FC1AD8108A78938588.sh
2021-07-27T07:17:01.2289360Z (1 failure)
2021-07-27T07:17:01.2705660Z ##[debug]success of first tool:false
2021-07-27T07:17:01.2787820Z ##[debug]rc:0
2021-07-27T07:17:01.2788560Z ##[debug]success:true
2021-07-27T07:17:01.2807190Z ##[debug]task result: Failed
2021-07-27T07:17:01.2844600Z ##[error]Error: /usr/bin/xcodebuild failed with return code: 65
2021-07-27T07:17:01.2856630Z ##[debug]Processed: ##vso[task.issue type=error;]Error: /usr/bin/xcodebuild failed with return code: 65
2021-07-27T07:17:01.2866680Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: /usr/bin/xcodebuild failed with return code: 65
2021-07-27T07:17:01.2867800Z ##[debug]Agent.Version=2.189.0
我的观察是 Azure 管道没有 macOS Big Sur 作为代理。我的本地机器在 POD 安装期间更改了一些配置并添加了脚本以支持最新的 Xcode 和 macOS,而 azure 管道代理不支持 macOS Big Sur,原因是它无法执行脚本。
注意:我已经尝试了所有干净的进程,例如 yarn、pod 或 delete node_module。
[azure-devops]