このタスクを使用して、macOS エージェント上のビルドに必要な Apple 証明書をインストールします。 このタスクを使用して、セキュリティで保護されたファイル として保存されている Apple 証明書をサーバーにインストールできます。
構文
# Install Apple certificate v2
# Install an Apple certificate required to build on a macOS agent machine.
- task: InstallAppleCertificate@2
inputs:
certSecureFile: # string. Required. Certificate (P12).
#certPwd: # string. Certificate (P12) password.
# Advanced
keychain: 'temp' # 'default' | 'temp' | 'custom'. Required. Keychain. Default: temp.
#keychainPassword: # string. Required when keychain = custom || keychain = default. Keychain password.
#customKeychainPath: # string. Required when keychain = custom. Custom keychain path.
#deleteCert: # boolean. Optional. Use when keychain = custom || keychain = default. Delete certificate from keychain.
#deleteCustomKeychain: # boolean. Optional. Use when keychain = custom. Delete custom keychain.
#signingIdentity: # string. Certificate signing identity.
#setUpPartitionIdACLForPrivateKey: # boolean. Set up partition_id ACL for the imported private key.
#opensslPkcsArgs: # string. OpenSSL arguments for PKCS12.
# Install Apple certificate v2
# Install an Apple certificate required to build on a macOS agent machine.
- task: InstallAppleCertificate@2
inputs:
certSecureFile: # string. Required. Certificate (P12).
#certPwd: # string. Certificate (P12) password.
# Advanced
keychain: 'temp' # 'default' | 'temp' | 'custom'. Required. Keychain. Default: temp.
#keychainPassword: # string. Required when keychain = custom || keychain = default. Keychain password.
#customKeychainPath: # string. Required when keychain = custom. Custom keychain path.
#deleteCert: # boolean. Optional. Use when keychain = custom || keychain = default. Delete certificate from keychain.
#deleteCustomKeychain: # boolean. Optional. Use when keychain = custom. Delete custom keychain.
#signingIdentity: # string. Certificate signing identity.
#setUpPartitionIdACLForPrivateKey: # boolean. Set up partition_id ACL for the imported private key.
# Install Apple certificate v2
# Install an Apple certificate required to build on a macOS agent machine.
- task: InstallAppleCertificate@2
inputs:
certSecureFile: # string. Required. Certificate (P12).
#certPwd: # string. Certificate (P12) password.
# Advanced
keychain: 'temp' # 'default' | 'temp' | 'custom'. Required. Keychain. Default: temp.
#keychainPassword: # string. Required when keychain = custom || keychain = default. Keychain password.
#customKeychainPath: # string. Required when keychain = custom. Custom keychain path.
#deleteCert: # boolean. Optional. Use when keychain = custom || keychain = default. Delete certificate from keychain.
#deleteCustomKeychain: # boolean. Optional. Use when keychain = custom. Delete custom keychain.
#signingIdentity: # string. Certificate signing identity.
入力
certSecureFile
-
証明書 (P12)
string
. 必須。
macOS エージェントにインストールする Secure Files
にアップロードされた証明書 (.p12) を指定します。
certPwd
-
証明書 (P12) パスワード
string
.
Apple 証明書 (.p12) のパスワードを指定します。 この値を暗号化するには、[Variables
] タブでロックが有効になっている新しいビルド変数を使用します。
キーチェーンの keychain
-
string
. 必須。 使用できる値: default
(既定のキーチェーン)、temp
(一時キーチェーン)、custom
(カスタム キーチェーン)。 既定値: temp
.
Apple 証明書をインストールするキーチェーンを指定します。 Microsoft でホストされるビルドの場合は、Temporary Keychain
を使用します。 ビルドまたはリリースが完了すると、一時的なキーチェーンは常に削除されます。
キーチェーン パスワードの keychainPassword
-
string
.
keychain = custom || keychain = default
する場合に必要です。
キーチェーンのロックを解除するパスワードを指定します。 この値を暗号化するには、[Variables
] タブでロックが有効になっている新しいビルド変数を使用します。 指定されていない場合は、一時キーチェーンのパスワードが生成されます。
カスタム キーチェーン パスの customKeychainPath
-
string
.
keychain = custom
する場合に必要です。
カスタム キーチェーン ファイルへの完全パスを指定します。 キーチェーンがまだ存在しない場合は、キーチェーンが作成されます。
deleteCert
-
キーチェーン から証明書を削除する
boolean
. 任意
keychain = custom || keychain = default
するときに使用します。
ビルドまたはリリースの完了後にキーチェーンから削除する証明書を指定します。
deleteCustomKeychain
-
カスタム キーチェーン を削除する
boolean
. 任意
keychain = custom
するときに使用します。
ビルドまたはリリースの完了後にエージェントから削除するカスタム キーチェーンを指定します。
証明書署名 IDの signingIdentity
-
string
.
署名証明書のサブジェクトの Common Name
を指定します。 空のままにした場合、Common Name
の解析を試みます。
setUpPartitionIdACLForPrivateKey
-
インポートされた秘密キー のpartition_id ACL を設定する
boolean
.
true
場合は、インポートされた秘密キーの partition_id
ACL を設定して、codesign
が署名にキーの使用を求めないようにします。 これは、MacOS High Sierra の一時的なキーチェーンには必要ありません。
オープンレーダーについて詳しくは、こちらをご覧ください。
PKCS12の OpenSSL 引数を opensslPkcsArgs
- する
string
.
openssl を使用して証明書情報を抽出するための引数。
タスク コントロールのオプション
すべてのタスクには、タスク入力に加えて制御オプションがあります。 詳細については、「コントロール オプションと一般的なタスク プロパティを参照してください。
出力変数
このタスクでは、次の 出力変数を定義します。この変数は、ダウンストリームのステップ、ジョブ、およびステージで使用できます。
signingIdentity
署名証明書のサブジェクトの解決済み Common Name
を指定します。 入力として指定されるか、P12 証明書ファイルから解析されます。
keychainPath
証明書を含むキーチェーン ファイルのパスを指定します。
注釈
このタスクを使用して、macOS エージェント上のビルドに必要な Apple 証明書をインストールします。 このタスクを使用して、セキュリティで保護されたファイル として保存されている Apple 証明書をサーバーにインストールできます。
必要条件
要件 | 説明 |
---|---|
パイプラインの種類 | YAML、クラシック ビルド、クラシック リリース |
実行日 | エージェント、DeploymentGroup |
の需要 | セルフホステッド エージェントには、このタスクを使用するジョブを実行するために 次の の要求に一致する 機能 が必要です。 |
機能の | このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。 |
コマンドの制限 | このタスクは、次の コマンド制限: restricted を使用して実行されます。 |
設定可能な変数 | このタスクには、signingIdentity、keychainPassword、keychainPath、APPLE_CERTIFICATE_SIGNING_IDENTITY、APPLE_CERTIFICATE_KEYCHAIN の 変数を設定するアクセス許可があります。 |
エージェントのバージョン | 2.182.1 以上 |
タスク カテゴリ | 効用 |