InstallAppleCertificate@2 - Apple 証明書 v2 タスクをインストールする

このタスクを使用して、macOS エージェントでビルドするために必要な Apple 証明書をインストールします。 このタスクを使用して、 セキュリティで保護されたファイル として格納されている Apple 証明書をサーバーにインストールできます。

macOS エージェントでビルドするために必要な 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.
# Install Apple Certificate v2
# Install an Apple certificate required to build on a macOS agent.
- 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を使用します。

ビルドまたはリリースの完了後にエージェントから削除するカスタム キーチェーンを指定します。


signingIdentity - 証明書署名 ID
string.

Common Name署名証明書のサブジェクトの を指定します。 これが空のままの場合は、 の Common Name 解析を試みます。


setUpPartitionIdACLForPrivateKey - インポートされた秘密キー partition_id ACL を設定する
boolean.

の場合 trueは、 partition_id インポートされた秘密キーの ACL を設定して codesign 、署名にキーを使用するように求めないようにします。 これは、MacOS High Sierra の一時的なキーチェーンには必要ありません。 詳細については、 Open Radar に関するページを参照してください。


opensslPkcsArgs - PKCS12 の OpenSSL 引数
string.

openssl を使用した抽出証明書情報の引数。


タスク制御オプション

すべてのタスクには、タスク入力に加えて制御オプションがあります。 詳細については、「 コントロール オプションと一般的なタスク プロパティ」を参照してください。

出力変数

このタスクでは、ダウンストリームのステップ、ジョブ、およびステージで使用できる次の 出力変数を定義します。

signingIdentity
署名証明書のサブジェクトの解決済 Common Name みを指定します。 入力として指定されるか、P12 証明書ファイルから解析されます。

keychainPath
証明書を含むキーチェーン ファイルのパスを指定します。

解説

このタスクを使用して、macOS エージェントでビルドするために必要な Apple 証明書をインストールします。 このタスクを使用して、 セキュリティで保護されたファイル として格納されている Apple 証明書をサーバーにインストールできます。

要件

要件 説明
パイプラインの種類 YAML、クラシック ビルド、クラシック リリース
上で実行 エージェント、DeploymentGroup
確認要求 セルフホステッド エージェントには、このタスクを使用するジョブを実行するために、次の要求に一致する機能が必要です。
Capabilities このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。
コマンドの制限 このタスクは、次の コマンド制限を使用して実行されます。
設定可能な変数 このタスクには、signingIdentity、keychainPassword、keychainPath、APPLE_CERTIFICATE_SIGNING_IDENTITY、APPLE_CERTIFICATE_KEYCHAINの 変数を設定するアクセス許可があります。
エージェントのバージョン 2.182.1 以降
タスクのカテゴリ ユーティリティ
要件 説明
パイプラインの種類 YAML、クラシック ビルド、クラシック リリース
上で実行 エージェント、DeploymentGroup
確認要求 セルフホステッド エージェントには、このタスクを使用するジョブを実行するために、次の要求に一致する機能が必要です。
Capabilities このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。
コマンドの制限 Any
設定可能な変数 Any
エージェントのバージョン 2.116.0 以上
タスクのカテゴリ ユーティリティ