我正在尝试做一个基本的Jenkins设置。我有一个带Automatically manage signing
的简单Xcode项目。我希望Jenkins下载项目并构建它。
我做了什么:
1)在我的mac(Shared/Jenkins
)上本地安装了Jenkins
2)Jenkins内部创建了一个自由风格项目,并将其配置为从git下载项目
3)在Shared/Jenkins/xcode.keychain-db
中创建了一个单独的钥匙串,并将其添加到开发人员和分发证书中
4)将所有自动生成的配置文件从~/Library/MobileDevice/Provisioning Profiles/
复制到Shared/Jenkins/Library/MobileDevice/Provisioning Profiles
5)在Jenkins中创建了一个构建脚本
security -v unlock-keychain -p myspass ${HOME}/xcode.keychain-db
xcodebuild clean build -target SampleCIApp -configuration Debug DEVELOPMENT_TEAM=…
构建失败:
Probing signature of /Users/Shared/Jenkins/Home/workspace/SampleCIApp/build/Debug-iphoneos/SampleCIApp.app/Frameworks/libswiftCore.dylib
/usr/bin/codesign '-r-' '--display' '/Users/Shared/Jenkins/Home/workspace/SampleCIApp/build/Debug-iphoneos/SampleCIApp.app/Frameworks/libswiftCore.dylib'
/Users/Shared/Jenkins/Home/workspace/SampleCIApp/build/Debug-iphoneos/SampleCIApp.app/Frameworks/libswiftCore.dylib: code object is not signed at all
Codesigning /Users/Shared/Jenkins/Home/workspace/SampleCIApp/build/Debug-iphoneos/SampleCIApp.app/Frameworks/libswiftCore.dylib
/usr/bin/codesign '--force' '--sign' '28B8F63A10AC0B5B39826E75B559232121EF686E' '--verbose' '/Users/Shared/Jenkins/Home/workspace/SampleCIApp/build/Debug-iphoneos/SampleCIApp.app/Frameworks/libswiftCore.dylib'
/Users/Shared/Jenkins/Home/workspace/SampleCIApp/build/Debug-iphoneos/SampleCIApp.app/Frameworks/libswiftCore.dylib: unknown error -1=ffffffffffffffff
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign' '28B8F63A10AC0B5B39826E75B559232121EF686E' '--verbose' '/Users/Shared/Jenkins/Home/workspace/SampleCIApp/build/Debug-iphoneos/SampleCIApp.app/Frameworks/libswiftCore.dylib'
}
看起来与代码签名有关。我错过了什么?