Skip to content

Commit

Permalink
JENKINS-15939, JENKINS-17184 display keychain timeout information
Browse files Browse the repository at this point in the history
  • Loading branch information
lacostej committed May 16, 2013
1 parent 60589e6 commit 5b2a452
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/au/com/rayh/XCodeBuilder.java
Expand Up @@ -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
Expand Down

4 comments on commit 5b2a452

@mAu888
Copy link

@mAu888 mAu888 commented on 5b2a452 May 23, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean that this broke your build ?

@mAu888
Copy link

@mAu888 mAu888 commented on 5b2a452 May 23, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mAu888
Copy link

@mAu888 mAu888 commented on 5b2a452 May 23, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.