I am trying to do a basic Jenkins setup. I have a simple Xcode project with Automatically manage signing. I want Jenkins to download the project and build it.
What I did:
1) Installed Jenkins locally on my mac (under Shared/Jenkins)
2) Inside Jenkins created a Free style project and configured it to download the project from git
3) Created a separate keychain in Shared/Jenkins/xcode.keychain-db and added to it developers and distribution certificates
4) Copied all automatically generated provisioning profiles from ~/Library/MobileDevice/Provisioning Profiles/ to Shared/Jenkins/Library/MobileDevice/Provisioning Profiles
5) In Jenkins created a build script
security -v unlock-keychain -p myspass ${HOME}/xcode.keychain-db
xcodebuild clean build -target SampleCIApp -configuration Debug DEVELOPMENT_TEAM=…
Build fails with:
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'
}
It looks like something to do with code signing. What am I missing?