2

在我将 Crashlytics 框架添加到该项目之前,我一直在我们的 Jenkins 服务器上构建一个 iOS 应用程序,没有任何问题。

现在运行此命令时失败:

/usr/bin/codesign --force --sign 97B4681D342EA8BD5AE8D283B6A924BF6AF3CF95 --resource-rules=/Users/jenkins/dev/workspace/megared-ios/build/Megared\ Stage.app/ResourceRules.plist --entitlements /Users/jenkins/Library/Developer/Xcode/DerivedData/Megared-hitcnfjdmnrzijfoehutangiwnos/Build/Intermediates/Megared.build/Stage-iphoneos/Megared.build/Megared\ Stage.xcent /Users/jenkins/dev/workspace/megared-ios/build/Megared\ Stage.app

错误如下:

/Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app: User interaction is not allowed.
Command /usr/bin/codesign failed with exit code 1

我有一个在构建项目开始时运行的 shell 脚本,它创建一个新的钥匙串,导入证书以进行分发,将 mobileprovision 复制到正确的库文件夹并解锁新创建的钥匙串。

如果我从构建阶段删除 Crashlytis 脚本,它会恢复正常构建。

当调用 Crashlytics 的“运行”命令时,似乎发生了一些事情,就像钥匙链再次被锁定或只是搞砸了一样。我正在努力寻找解决方案。

更新:

看起来 Crashlytics 的失败命令就是这个命令,它与 GUI 无关:

2014-04-28 09:40:45.004 run[54378:507] Crashlytics.framework/run 1.3.6
2014-04-28 09:40:45.033 run[54378:507] 

Crashlytics: Src root /Users/jenkins/dev/workspace/megared-ios/Megared
2014-04-28 09:40:45.033 run[54378:507] 

Crashlytics: Current directory path /Users/jenkins/dev/workspace/megared-ios/Megared
2014-04-28 09:40:45.035 run[54378:507] 

Crashlytics: Run script build phase called from Xcode Bots 0
2014-04-28 09:40:45.036 run[54378:507] 

Crashlytics: Run script build phase called from Xcode.app 0
2014-04-28 09:40:46.612 run[54378:507] 

Crashlytics: Could not be onboarded statusCode 404
2014-04-28 09:40:49.805 run[54378:507] 

Crashlytics: Uploading dSYM at path /Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app.dSYM
2014-04-28 09:41:39.635 run[54378:507] 

Crashlytics: Uploading dSYM at path /Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app.dSYM
2014-04-28 09:42:02.295 run[54378:507] 

Crashlytics: Megared Stage.app.dSYM could not be uploaded statusCode 0 Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x10026a490 {NSUnderlyingError=0x1002add30 "The request timed out.", NSErrorFailingURLStringKey=https://api.crashlytics.com/api/v1/1fc7b0115d986225bd4df420f1a979cd6114256d/dsyms, NSErrorFailingURLKey=https://api.crashlytics.com/api/v1/1fc7b0115d986225bd4df420f1a979cd6114256d/dsyms, NSLocalizedDescription=The request timed out.}
Command /bin/sh failed with exit code 1
4

1 回答 1

0

听起来您需要在 GUI 会话中运行 Jenkins。您似乎已经安装了 Jenkins 作为后台守护程序运行,它无法访问 GUI 来绘制窗口或访问 GUI 应用程序需要的任何服务。为此,我制作了https://github.com/stisti/jenkins-app 。或者您可以在终端窗口中运行“java -jar jenkins.war”。

于 2014-04-25T18:23:44.483 回答