InstallAppleCertificate@1 - 安装 Apple 证书 v1 任务

使用此任务安装在 macOS 代理上生成的 Apple 证书。 可以使用此任务安装存储在服务器上的 安全文件的 Apple 证书。

语法

# Install Apple Certificate v1
# Install an Apple certificate required to build on a macOS agent.
- task: InstallAppleCertificate@1
  inputs:
    certSecureFile: # string. Required. Certificate (P12). 
    #certPwd: # string. Certificate (P12) password. 
  # Advanced
    keychain: 'temp' # 'default' | 'temp' | 'custom'. Required. Keychain. Default: temp.
    #keychainPassword: # string. 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 代理上安装的证书 (.p12) Secure Files


certPwd - 证书 (P12) 密码
string.

指定 Apple 证书 (.p12) 的密码。 使用在选项卡上启用 Variables 锁的新生成变量来加密此值。


keychain - 钥匙
string. 必需。 允许的值: default (默认密钥链) 、 temp (临时密钥链) 、 custom (自定义密钥链) 。 默认值:temp

指定要在其中安装 Apple 证书的密钥链。 生成或发布完成后,将始终删除临时密钥链。


keychainPassword - 密钥链密码
string.

指定要解锁密钥链的密码。 使用在选项卡上启用 Variables 锁的新生成变量来加密此值。 如果尚未指定密码,则会为临时密钥链生成密码。


customKeychainPath - 自定义密钥链路径
string. 在 .keychain = custom

指定自定义密钥链文件的完整路径。 如果密钥链尚不存在,将创建密钥链。


deleteCert - 从密钥链中删除证书
boolean. 可选。 使用时间 keychain = custom || keychain = default

指定要在生成或发布完成后从密钥链中删除的证书。


deleteCustomKeychain - 删除自定义密钥链
boolean. 可选。 使用时间 keychain = custom

指定要在生成或发布完成后从代理中删除的自定义密钥链。


signingIdentity - 证书签名标识
string.

指定 Common Name 签名证书中的使用者。 将尝试分析 Common Name 是否为空。


任务控制选项

除任务输入外,所有任务都具有控制选项。 有关详细信息,请参阅 “控制”选项和常见任务属性

输出变量

此任务定义以下 输出变量,可在下游步骤、作业和阶段中使用这些变量。

signingIdentity
指定签名证书中使用者的解析 Common Name 。 提供为输入或从 P12 证书文件进行分析。

keychainPath
使用证书指定密钥链文件的路径。

要求

要求 说明
管道类型 YAML,经典版本,经典版本
运行平台 代理,DeploymentGroup
需求 自承载代理必须具有与以下要求匹配的功能才能运行使用此任务的作业: xcode
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任意
可设置变量 任意
代理版本 2.116.0 或更高版本
任务类别 实用工具