Change By: Trey Duskin (11/Mar/14 9:50 PM)
Summary: "keychain with the same name already exists" error with  Multi-configuration and  developer profile import
Description: I have a  multi-configuration  build set up using the Xcode plugin with a  user-defined axis for build targets in the Xcode project, as well as the slave axis  restriction set  to  force the builds to execute  run  on  my  an  OSX build slave  (and not anywhere else) .  The first build step in this job is to import the developer profile using the "Import Developer Profile" function.  When I set it up this way, the first time I execute the build, the  child jobs launch  job launches  and  complete  completes  successfully.  The second time I try to run this build, however,  all  the  child jobs fail  job fails  at the "import developer profile" step.  The console log for  one of  the  child  builds shows the following:

$ security list-keychains
$ security create-keychain -p ******** jenkins-iOS-Client-
app=TargetA,label=osx Dev
security: SecKeychainCreate jenkins-iOS-Client-
app=TargetA,label=osx Dev : A keychain with the same name already exists.
ERROR: Failed to create a keychain
Finished: FAILURE

The other child jobs show the same errors for their respective build targets.

If I manually run the 'security list-keychains' on the build slave as the build user (jenkins), I don't see any keychains listed:

$ sudo -u jenkins security list-keychains
Password:
    "/Library/Keychains/System.keychain"

However, if I  look in the Keychains directory for the ' m guessing this is why jenkins' user on  the  Xcode plugin tries to re-create  OSX machine, I see a file named with  the keychain :

$ pwd
/var/lib/jenkins/Library/Keychains
$ ls -l
total 176
-rw-r--r--  1 jenkins  jenkins  37292 Mar 11 11:33 jenkins-iOS-Client-Dev
-rw-r--r--  1 jenkins  jenkins  45164 Feb 21 17:30 login
. keychain

This is a major issue for us as, without
 us  being able to  use multi-configuration jobs with Xcode  import developer profiles dynamically in the job config , we have to  create a new job for every individual  go manually tweak the  build  target  environment to include the proper certs ,  which is unscalable for us  mobileprofiles and credentials .
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to