Search code examples
jenkinsjenkins-pluginsxcode9xcode-plugin

Jenkins xcode plugin wrongly reports that no developer profile was configured


I would like to use the Jenkins Xcode Plugin to build and sign my application in an automated fashion.

As per the aproriate instructions I uploaded a valid developer profile as a Jenkins credential. In a sample freestyle project I then added the build step Import developer profile where I selected the aforementioned profile. I chose to import the credentials to an existing empty keychain, so that I can see what happens with regards to the contents of that keychain.

When I build the project, the build fails with the following message, and nothing ever gets written to the selected keychain. The issue is reproducible with just the Import developer profile build step although I've tried it with a more realistic setup.

$ security unlock-keychain -p ******** /path/to.keychain
ERROR: No Apple developer profile is configured
Finished: FAILURE

Any suggestions on how to debug this issue further are greatly appreciated!


Solution

  • I ended up ditching the Xcode-Plugin for Jenkins and made direct calls to xcodebuild and altool based on the instructions detailed in Use xcodebuild (Xcode 8) and automatic signing in CI (Travis/Jenkins) environments and a Medium post by Shashikant Jagtap.

    My developer profile is set up with Xcode and the approriate certificates are installed in the login keychain (managed by Xcode).

    Bear in mind though, that I'm generating the Xcode project from within Unity, so this might not apply to bare Xcode projects or other configurations.