openbakery / gradle-xcodePlugin

gradle plugin for building Xcode Projects for iOS, watchOS, macOS or tvOS
Apache License 2.0
457 stars 127 forks source link

Update keychain partition list #375

Closed phatblat closed 6 years ago

phatblat commented 6 years ago

We've been having the same issue as #342, #352 and #373 in our Jenkins environment - this mysterious "unknown error -1=ffffffffffffffff" from the codesign command.

* What went wrong:
Execution failed for task ':package'.
> Command failed to run (exit code 1): '/usr/bin/codesign --force --sign 948DB5BD62837CCE32A8932975B3D3BA6531B0F7 --verbose /Volumes/Data/workspace/MDK_iOS_MDKApp_master-KP2TV3QN7RLYISBMTOZYLRZWIGYGXKYF3DTICK3DKOSG4UG2T6WQ/build/package/Payload/MDK.app/Frameworks/AFNetworking.framework --keychain /Volumes/Data/workspace/MDK_iOS_MDKApp_master-KP2TV3QN7RLYISBMTOZYLRZWIGYGXKYF3DTICK3DKOSG4UG2T6WQ/build/codesign/gradle-1515608242679.keychain'
  Tail of output:
  /Volumes/Data/workspace/MDK_iOS_MDKApp_master-KP2TV3QN7RLYISBMTOZYLRZWIGYGXKYF3DTICK3DKOSG4UG2T6WQ/build/package/Payload/MDK.app/Frameworks/AFNetworking.framework: unknown error -1=ffffffffffffffff

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 10s

I was able to resolve this by adding apple-tool: and codesign: to the partition list as per the last comment in this SO post.

The relevant spock test has been updated, but I had 4 failing tests from the develop branch before making any changes. I fixed two of them in CommandRunnerSpecification where the cp command usage output has changed on macOS 10.13:

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

Update: The changes to CommandRunnerSpecification have been reverted since the Travis build image being used appears to still be running macOS 10.12. (test failures)

The 2 other failing tests were in SigningTest.groovy, which I wasn't able to find.

Are these last 2 tests auto-generated?