@@ -101,8 +101,8 @@ pipeline {
101101
102102 environment {
103103 AWS_ACCOUNT_ID = '749683154838'
104- KEYCHAIN_PASSPHRASE = credentials('ide-keychain-passphrase')
105104 KEYCHAIN_PATH = "${WORKSPACE}/buildagent.keychain"
105+ KEYCHAIN_PASSPHRASE = credentials('ide-keychain-passphrase')
106106 MACOS_DEVELOPER_CERTIFICATE = credentials('MACOS_DEVELOPER_CERTIFICATE')
107107 MACOS_DEVELOPER_CERTIFICATE_KEY = credentials('MACOS_DEVELOPER_CERTIFICATE_KEY')
108108 }
@@ -113,8 +113,6 @@ pipeline {
113113 }
114114 script {
115115 sh '''
116- set -e
117-
118116 # Set up a keychain to hold our credentials
119117 security create-keychain -p "${KEYCHAIN_PASSPHRASE}" "${KEYCHAIN_PATH}"
120118 security unlock-keychain -p "${KEYCHAIN_PASSPHRASE}" "${KEYCHAIN_PATH}"
@@ -126,8 +124,16 @@ pipeline {
126124 -P "${MACOS_DEVELOPER_CERTIFICATE_KEY}" \
127125 -T /usr/bin/codesign
128126
129- # Validate the available identity
127+ # Allow access to keychain without prompting
128+ security set-key-partition-list -S apple-tool:,apple: -s -k "${KEYCHAIN_PASSPHRASE}" "${KEYCHAIN_PATH}"
129+
130+ # Try to set this as the default keychain
130131 security list-keychains -s "${KEYCHAIN_PATH}"
132+ security default-keychain -s "${KEYCHAIN_PATH}"
133+
134+ # Validate the available identities
135+ security find-identity
136+ security find-identity "${KEYCHAIN_PATH}"
131137 '''
132138 }
133139 // Import the Developer ID certificate from Jenkins Secrets.
0 commit comments