Jenkins iOS协同设计失败,退出代码为1 [英] Jenkins iOS Codesigning failed with exit code 1
问题描述
需要进行哪些Jenkins设置才能对Apple移动设备的iOS应用进行签名?我正在尝试在备用MacBook上设置Jenkins,以便首次在新的iOS应用上执行CI.
What Jenkins settings need to be configured for it to sign iOS apps for apple mobile devices? I'm trying to set up Jenkins on a spare MacBook to do CI on a new iOS app for the first time.
- 我可以从命令行构建和部署
- Jenkins配置为使用与终端
PATH=~/Qt/5.9.2/ios/bin:$PATH make -j 12 QMAKE_FLAGS="QPROTOC=/Users/admin/projects/build-QObjectProtobufCompiler-Desktop_Qt_5_9_2_clang_64bit-Debug/qprotoc/qprotoc CONFIG+=iphoneos CONFIG+=device" BUILD_ARCH=ios
中的命令相同的命令 - 我将Jenkins设置为使用与我在命令行上建立的用户相同的用户(包括更改文件夹,日志等所有权)
- 这是一个qt项目(make调用qmake,然后在自动生成的makefile上进行make)
- I can build and deploy from the command line
- Jenkins is configured to use the same command as the one that works in the terminal
PATH=~/Qt/5.9.2/ios/bin:$PATH make -j 12 QMAKE_FLAGS="QPROTOC=/Users/admin/projects/build-QObjectProtobufCompiler-Desktop_Qt_5_9_2_clang_64bit-Debug/qprotoc/qprotoc CONFIG+=iphoneos CONFIG+=device" BUILD_ARCH=ios
- I set Jenkins to use the same user as the one I am building on the command line with (including changing folder, log, etc ownership)
- this is a qt project (make invokes qmake and then make on the auto-generated makefile)
这是我得到的Jenkins错误输出:
This is the Jenkins error output I get:
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/ Xcode.app/Contents/Developer/usr/bin:/Users/admin/Qt/5.9.2/ios/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module connect --output-partial-info-plist /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/connect.build/ Debug-iphoneos/connect.build/LaunchScreen-PartialInfo.plist --auto-activate-custom-fonts --target-device iphone --target-device ipad --minimum-deployment-target 8.0 --output-format human-readable-text --compile / Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/Debug-iphoneos/connect.app/LaunchScreen.nib / Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/connect.xcodeproj/LaunchScreen.xib
ProcessInfoPlistFile Debug-iphoneos/connect.app/Info.plist /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/app/ ios/Info.plist
cd /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/ Applications/Xcode.app/Contents/Developer/usr/bin:/Users/admin/Qt/5.9.2/ios/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-infoPlistUtility /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/app/ios/Info.plist -genpkginfo / Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/Debug-iphoneos/connect.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -additionalcontentfile /Users/Shared/Jenkins/Home/ workspace/mobileAppIOS/.build/ios/app/connect.build/Debug-iphoneos/connect.build/Launch-PartialInfo.plist -additionalcontentfile /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/connect.build/ Debug-iphoneos/connect.build/LaunchScreen-PartialInfo.plist -o /Users/Shared/Jenkins/Home/workspace/ mobileAppIOS/.build/ios/app/Debug-iphoneos/connect.app/Info.plist
ProcessProductPackaging /Users/admin/Library/MobileDevice/Provisioning\ Profiles/ REDACTED.mobileprovision Debug-iphoneos/connect.app/embedded.mobileprovision
cd /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/ Applications/Xcode.app/Contents/Developer/usr/bin:/Users/admin/Qt/5.9.2/ios/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-productPackagingUtility /Users/admin/Library/MobileDevice/Provisioning\ Profiles/ REDACTED.mobileprovision -o /Users/Shared/Jenkins/Home/workspace/ mobileAppIOS/.build/ios/app/Debug-iphoneos/connect.app/embedded.mobileprovision
Touch Debug-iphoneos/connect.app
cd /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/ Applications/Xcode.app/Contents/Developer/usr/bin:/Users/admin/Qt/5.9.2/ios/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/touch -c /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/Debug-iphoneos/connect.app
ProcessProductPackaging "" connect.build/Debug-iphoneos/connect.build/connect.app.xcent
cd /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/ Applications/Xcode.app/Contents/Developer/usr/bin:/Users/admin/Qt/5.9.2/ios/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Entitlements:
{
"application-identifier" = "REDACTED.com.precisionplanting.connect";
"com.apple.developer.team-identifier" = REDACTED;
"get-task-allow" = 1;
"keychain-access-groups" = (
"REDACTED.com.precisionplanting.connect"
);
}
builtin-productPackagingUtility -entitlements -format xml -o /Users/Shared/Jenkins/Home/workspace/ mobileAppIOS/.build/ios/app/connect.build/Debug-iphoneos/connect.build/connect.app.xcent
CodeSign Debug-iphoneos/connect.app
cd /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin /codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/ Applications/Xcode.app/Contents/Developer/usr/bin:/Users/admin/Qt/5.9.2/ios/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: Michael Rink (REDACTED)"
Provisioning Profile: "iOS Team Provisioning Profile: *"
(REDACTED)
/usr/bin/codesign --force --sign EA9034E507C1108550F4A5269522F7EAA05FDE05 --entitlements /Users/Shared/Jenkins/ Home/workspace/mobileAppIOS/.build/ios/app/connect.build/Debug-iphoneos/connect.build/connect.app.xcent --timestamp=none /Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/Debug-iphoneos/connect.app
/Users/Shared/Jenkins/Home/workspace/mobileAppIOS/.build/ios/app/Debug-iphoneos/connect.app: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1
** BUILD FAILED **
The following build commands failed:
CodeSign Debug-iphoneos/connect.app
(1 failure)
make[2]: *** [xcodebuild-debug-device] Error 65
推荐答案
关键是启用包含用于代码签名的证书和供应配置文件的钥匙串.这可以通过以下方式完成:
The key is to enable the keychain containing the certificates and provisioning profiles for code signing. This can be accomplished by:
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k keychainPass keychainName
这是与fastlane的github相关的问题
This is a related issue on fastlane's github
此是我写的使用fastlane和Jenkins建立整个管道的帖子
This is the post I wrote to setup the whole pipeline using fastlane and Jenkins
这篇关于Jenkins iOS协同设计失败,退出代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!