使用此任务安装在 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
。 必填。
指定上传到 Secure Files
以在 macOS 代理上安装的证书(.p12)。
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
指定带证书的密钥链文件的路径。