Fastlane构建工作来自命令行,而不是Jenkins

时间:2018-03-12 21:10:36

标签: ios jenkins fastlane

我有一个非常简单的快速通道设置:

lane :buildonly do
  build_app scheme: "MyApp", configuration: "Release", export_xcargs: "-allowProvisioningUpdates"
end

此通道在完全无人值守的命令行上完美运行(我必须第一次输入我的凭据,但现在它会记住它们。)

[16:54:39]: Successfully exported and compressed dSYM file
[16:54:39]: Successfully exported and signed the ipa file:
[16:54:39]: /Users/jenkins/MyApp/MyApp.ipa

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 2    | build_app        | 594         |
+------+------------------+-------------+

[16:54:40]: fastlane.tools just saved you 10 minutes! 

我设置了一个简单的Jenkins工作(同一台机器,同一个用户),它只是克隆我的仓库并运行脚本

bundle install
bundle exec fastlane buildonly

这很快就失败了:

[16:59:41]: ▸ === BUILD TARGET MyTarget OF PROJECT MyApp WITH CONFIGURATION Release ===
[16:59:41]: ▸ Check dependencies
[16:59:41]: ▸ Code Signing Error: No signing certificate "iOS Development" found:  No "iOS Development" signing certificate matching team ID "FFFFFFFF" with a private key was found.

我需要更改有关Jenkins设置的内容,以便它可以看到与命令行相同的证书?

1 个答案:

答案 0 :(得分:0)

由于Jenkins使用launchd运行,我不得不将Jenkins用户的证书从“登录”钥匙串复制到“系统”。

感谢this问题。