【发布时间】:2022-01-27 21:24:12
【问题描述】:
这是一个常见问题,我已经搜索了很长时间,但没有找到解决方案。所以,如果你能帮助我,我非常感激,因为我几乎疯了。可能是 Xcode 13 的问题,或者是 MacOS 版本,我不知道了。
我在 Jenkins 的存档过程中遇到以下错误:
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'lottie-ios' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'lottie-ios' from project 'Pods')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'CryptoSwift' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'CryptoSwift' from project 'Pods')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'Charts' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Charts' from project 'Pods')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'Socket.IO-Client-Swift' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Socket.IO-Client-Swift' from project 'Pods')
CodeSign /Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Digital-Push.appex (in target 'Digital-Push' from project 'Digital')
(9 failures)
这就是健身房日志中的内容:
/usr/bin/codesign --force --sign DB14DD2701DF6BB1D23A6A554C4FDBA1FE9C1A56 --entitlements /Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/Digital.build/Release-iphoneos/Digital-Push.build/Digital-Push.appex.xcent --generate-entitlement-der /Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Digital-Push.appex
Warning: unable to build chain to self-signed root for signer "Apple Distribution: Banco BTG Pactual S.A. (FU2YTD6J36)"
/Users/ec2-user/Library/Developer/Xcode/DerivedData/Digital-gcckbpuniqjuffdycaxavadslfdj/Build/Intermediates.noindex/ArchiveIntermediates/Digital/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Digital-Push.appex: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
在跑健身房之前,我会通过两种方式解锁钥匙链,直接和通过 fastlane:
security -v unlock-keychain -p $PASSWORD /Users/ec2-user/Library/Keychains/login.keychain
desc "Unlock keychain so jenkins can get authencation infos"
lane :keychain do
UI.success("✅✅✅ Unlock keychain so jenkins can get authencation infos ✅✅✅")
unlock_keychain(
path: "login",
password: @keychain_password
)
end
我的证书和密钥一切正常,如果我通过本地终端在 Xcode 和 Fastlane 中执行相同的过程,一切都运行顺利,它只是发生在 Jenkins 中。
最后一件事,如果确实有所不同,那就是 Jenkins 工作区不在用户目录中,它位于 /opt/jenkins/workspace。
【问题讨论】:
-
你能解决这个问题吗?
标签: ios xcode jenkins code-signing fastlane