Permalink
Browse files

JENKINS-15939, JENKINS-17184 display keychain timeout information

  • Loading branch information...
lacostej committed May 16, 2013
1 parent 60589e6 commit 5b2a452d965abfe3660092cda378f0dc2b835d41
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/main/java/au/com/rayh/XCodeBuilder.java
@@ -361,6 +361,7 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListener lis
String keychainPwd = envs.expand(keychain.getKeychainPassword());
launcher.launch().envs(envs).cmds("/usr/bin/security", "list-keychains", "-s", keychainPath).stdout(listener).pwd(projectRoot).join();
launcher.launch().envs(envs).cmds("/usr/bin/security", "default-keychain", "-d", "user", "-s", keychainPath).stdout(listener).pwd(projectRoot).join();
launcher.launch().envs(envs).cmds("/usr/bin/security", "show-keychain-info", keychainPath).stdout(listener).pwd(projectRoot).join();
if (StringUtils.isEmpty(keychainPwd))
returnCode = launcher.launch().envs(envs).cmds("/usr/bin/security", "unlock-keychain", keychainPath).stdout(listener).pwd(projectRoot).join();
else

4 comments on commit 5b2a452

@mAu888

This comment has been minimized.

Copy link

mAu888 replied May 23, 2013

Please note that you have to run this after you unlock the keychain! If not, OS X will prompt you for the keychains password!

@lacostej

This comment has been minimized.

Copy link
Member Author

lacostej replied May 23, 2013

Do you mean that this broke your build ?

@mAu888

This comment has been minimized.

Copy link

mAu888 replied May 23, 2013

It does not break the build, but the prompt for entering password keeps open (you can't run show-keychain-info on a locked keychain). I moved this line after the if/else. I'll push my changes today.

Please sign in to comment.