首页 文章

Xcode Server Bot集成停止在xcrun上xcodebuild -exportArchive“导出可安装产品”

提问于
浏览
0

Xcode Server Bot集成在第六阶段失速:

“导出可安装产品”

enter image description here

原始构建日志显示为最终条目:

$ /usr/bin/xcrun xcodebuild -exportArchive -archivePath /Library/Developer/XcodeServer/Integrations/Integration-7f80e03e9471a040c753957c2600b0a6/BetUP.xcarchive -exportPath /Library/Developer/XcodeServer/Integrations/Integration-7f80e03e9471a040c753957c2600b0a6/ExportedProduct -exportOptionsPlist /Library/Developer/XcodeServer/Integrations/Integration-7f80e03e9471a040c753957c2600b0a6/ExportOptions.plist -IDEPostProgressNotifications=YES -DVTAllowServerCertificates=YES -DVTSigningCertificateSourceLogLevel=3 -DVTSigningCertificateManagerLogLevel=3 -DTDKProvisioningProfileExtraSearchPaths=/Library/Developer/XcodeServer/ProvisioningProfiles -configuration Debug

2016-09-05 13:50:33.659 xcodebuild[61877:3819468] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/x2/t8b7x9gs2x32b686xfzq77lw000087/T/MyApp_2016-09-05_13-50-33.658.xcdistributionlogs'.
2016-09-05 13:50:33.704 xcodebuild[61877:3819468] [MT] DeveloperPortal: Using pre-existing current store at URL (file:///var/_xcsbuildd/Library/Developer/Xcode/DeveloperPortal%207.3.1.db).
2016-09-05 13:50:33.712 xcodebuild[61877:3819482]  DVTSigningCertificateSource: Searching for signing identities in default keychain search list
2016-09-05 13:50:33.738 xcodebuild[61877:3819482]  DVTSigningCertificateSource: Searching for signing identities in default keychain search list
2016-09-05 13:50:33.757 xcodebuild[61877:3819482]  DVTSigningCertificateManager: __58-[DVTSigningCertificateManager forceFullSyncWithCallback:]_block_invoke (0x7fbc650a88a0): Signing certificates = {(

最终集成达到超时限制并失败并显示错误:

断言:运行任务已终止,因为它没有超过1200秒的活动(使用sudo xcrun xcscontrol --configure-integration-timeout来增加此超时)

没有必要将超时时间增加到超过1200秒--20分钟 - 因为它永远不会完成 . 早期阶段需要三分钟,因此十七分钟就有足够的时间进行出口 .

这些其他帖子没有提供解决方案:

Xcode Server Bot integration fails to export archive with Assertion fail: exportArchive: ipatool failed with an exception

Xcode Server Bot integration fails to export archive: Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t be completed."

将私钥 - 通过拖动 - 从登录用户复制到系统密钥链也无法解决:

Xcode Bots: Common Problems And Workarounds

抓着稻草,我已经尝试了很多其他的东西,包括教程Xcode Server Hacks: 2. Taking control with xcscontrol中描述的 --sync-portal .

更不用说重启了 - 没有重置! - 使用此命令:

sudo xcrun xcscontrol --restart

尝试了几乎我能想到的一切,如何解决这个问题?

1 回答

  • 1

    最后,唯一要做的就是重置Xcode服务器:

    正如Xcode Server Hacks: 1. Under the Hood of Xcode Server疑难解答中所强调:

    “当你破解太多并且Xcode Server发疯时,你需要一种方法来重置它的所有状态并重新开始 . 当我最初开发Buildasaur时,我会每天重置几次Xcode Server . 有一个命令可以停止Xcode Server的所有运行守护进程并删除/ Library / Developer / XcodeServer的所有内容 . 小心,你的所有机器人和集成数据也将被删除 . 在调试过程中它是一个不可或缺的工具,但要小心 生产环境 ,不要小心删除所有Bots和Integration资产 . “

    该命令吹走了所有机器人和配置:

    sudo xcrun xcscontrol --reset.
    

    完成后,有必要重新启动,配置Server应用程序的Xcode服务以添加必要的开发人员团队 .

    这就是事情变得有趣的地方 .

    输入Apple ID后,选择了相关的团队;显示错误:

    “您必须是团队代理或管理员才能将此服务器添加到开发人员团队”

    使用Apple的开发人员门户将Apple ID设置为团队管理员修复了该问题 .

    在测试Bot中添加了它,它工作了!

    在经历了所有这些痛苦后,我的建议如下:

    -- Delete the teams from Server's Xcode service. Then re-add. This will expose any issues with admin privileges.

    要么

    -- Failing that, perform a reset and reconfigure the Server's Xcode service. Then re-add the Bots again.

    上面的第二个选项是痛苦,但它比花费数小时甚至数天试图解决要快得多 . 我能够在一个多小时内重置,重新配置并重新添加大约十个机器人 - 通过复制 .

相关问题