使用Jenkins构建Xcode 8问题

时间:2016-11-03 10:41:28

标签: ios swift xcode jenkins xcode8

我刚下载Xcode 8,进行一些设置更改并尝试使用Jenkins进行构建,但它失败并出现此错误:

The following build commands failed:
  CompileSwift normal arm64 /Users/ujenkins/ujenkins/workspace/project-ios/XXXXX/Views/Timeline/Components/Transitions/CustomTransition.swift
  CompileSwift normal arm64 /Users/ujenkins/ujenkins/workspace/project-ios/XXXXX/ProjectBase/Operations/TextViewController.swift
  CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(3 failures)
Build step 'Execute shell' marked build as failure
Build step 'Upload to HockeyApp' marked build as failure
Finished: FAILURE

我不知道是否可能是HockeyApp问题或者是因为Xcode 8设置。 我正在使用手动签名配置,但我没有iOS Distribution或iOS开发证书。

我非常感谢您提供的任何帮助

2 个答案:

答案 0 :(得分:1)

我发现了问题,因为我们在Jenkins中有Xcode 7.3,所以我们需要更新或创建一个带有8.0的Slave,然后我们将通过Jenkins成功构建应用程序。

我在这里找到了如何做到这一点。 http://andymolloy.net/specifying-xcode-version-for-jenkins-projects/

答案 1 :(得分:0)

我遇到过类似的情况:

** ARCHIVE FAILED **

The following build commands failed:
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Main/View/WRNavigationBar/WRNavigationBar.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Main/View/ESTabBar.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Voice/Model/LXSkillConversion.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Lib/VoiceLib/model/FM.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Lib/VoiceLib/LXVoiceDefine.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Lib/VoiceLib/LXSpeechSynthesizerAli.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Voice/Controller/LXSkillSettingViewController.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Device/Controller/LXDeviceViewController.swift
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Voice/Controller/LXVoiceViewController.swift
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
    CompileSwift normal arm64 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Voice/Controller/LXSkillSettingViewController.swift
(11 failures)
Build step 'Execute shell' marked build as failure
Finished: FAILURE

这很奇怪,因为远程master分支之前已经建立好。我试图通过Xcode删除上述的某些.swift文件,例如FM.swift并推送到远程存储库。尝试再次构建。

但是我仍然有这个:

** ARCHIVE FAILED **
The following build commands failed:
    CompileSwift normal arm64 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Voice/Controller/LXSkillSettingViewController.swift
    CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
    CompileSwift normal armv7 /Users/ifeegoo/.jenkins/workspace/ios-bluetooth-voice-assistant/VoiceAssistant/Voice/Controller/LXSkillSettingViewController.swift
(3 failures)
Build step 'Execute shell' marked build as failure
Finished: FAILURE

然后我尝试通过Xcode删除LXSkillSettingViewController.swift并推送到远程存储库,然后尝试再次构建。没关系!!!另外,我尝试返回到第一个节点,然后确定。我认为之前存在一些配置错误。如果遇到类似的情况,可以尝试解决此类问题。