你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft.ContainerRegistry 注册表/任务 2018-09-01
Bicep 资源定义
可以使用目标操作部署注册表/任务资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.ContainerRegistry/registries/tasks 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.ContainerRegistry/registries/tasks@2018-09-01' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
agentConfiguration: {
cpu: int
}
credentials: {
customRegistries: {
{customized property}: {
password: {
type: 'string'
value: 'string'
}
userName: {
type: 'string'
value: 'string'
}
}
}
sourceRegistry: {
loginMode: 'string'
}
}
platform: {
architecture: 'string'
os: 'string'
variant: 'string'
}
status: 'string'
step: {
contextAccessToken: 'string'
contextPath: 'string'
type: 'string'
// For remaining properties, see TaskStepProperties objects
}
timeout: int
trigger: {
baseImageTrigger: {
baseImageTriggerType: 'string'
name: 'string'
status: 'string'
}
sourceTriggers: [
{
name: 'string'
sourceRepository: {
branch: 'string'
repositoryUrl: 'string'
sourceControlAuthProperties: {
expiresIn: int
refreshToken: 'string'
scope: 'string'
token: 'string'
tokenType: 'string'
}
sourceControlType: 'string'
}
sourceTriggerEvents: [
'string'
]
status: 'string'
}
]
}
}
tags: {
{customized property}: 'string'
}
}
TaskStepProperties 对象
设置 类型 属性以指定对象的类型。
对于 Docker,请使用:
{
arguments: [
{
isSecret: bool
name: 'string'
value: 'string'
}
]
dockerFilePath: 'string'
imageNames: [
'string'
]
isPushEnabled: bool
noCache: bool
target: 'string'
type: 'Docker'
}
对于 EncodedTask,请使用:
{
encodedTaskContent: 'string'
encodedValuesContent: 'string'
type: 'EncodedTask'
values: [
{
isSecret: bool
name: 'string'
value: 'string'
}
]
}
对于 FileTask,请使用:
{
taskFilePath: 'string'
type: 'FileTask'
values: [
{
isSecret: bool
name: 'string'
value: 'string'
}
]
valuesFilePath: 'string'
}
属性值
AgentProperties
名字 | 描述 | 价值 |
---|---|---|
中央处理器 | 在运行所需的内核数方面,CPU 配置。 | int |
论点
名字 | 描述 | 价值 |
---|---|---|
isSecret | 用于指示参数是否表示机密并想要从生成日志中删除的标志。 | bool |
名字 | 参数的名称。 | string (必需) |
价值 | 参数的值。 | string (必需) |
AuthInfo
名字 | 描述 | 价值 |
---|---|---|
expiresIn | 令牌保持有效时间(以秒为单位) | int |
refreshToken | 用于刷新访问令牌的刷新令牌。 | 字符串 |
范围 | 访问令牌的范围。 | 字符串 |
令 牌 | 用于访问源代码管理提供程序的访问令牌。 | string (必需) |
tokenType | 身份验证令牌的类型。 | “OAuth” “PAT”(必需) |
BaseImageTrigger
名字 | 描述 | 价值 |
---|---|---|
baseImageTriggerType | 基础映像依赖项更新的自动触发器的类型。 | “All” “Runtime”(必需) |
名字 | 触发器的名称。 | string (必需) |
地位 | 触发器的当前状态。 | “Disabled” “Enabled” |
凭据
名字 | 描述 | 价值 |
---|---|---|
customRegistries | 描述用于访问其他自定义注册表的凭据参数。 密钥 字典项的 |
CredentialsCustomRegistries |
sourceRegistry | 描述用于访问源注册表的凭据参数。 | SourceRegistryCredentials |
CredentialsCustomRegistries
名字 | 描述 | 价值 |
---|
CustomRegistryCredentials
名字 | 描述 | 价值 |
---|---|---|
密码 | 用于登录到自定义注册表的密码。 密码是机密 对象,允许通过多种方式为其提供值。 |
SecretObject |
userName | 用于登录到自定义注册表的用户名。 | SecretObject |
DockerBuildStep
名字 | 描述 | 价值 |
---|---|---|
参数 | 执行此生成步骤时要使用的重写参数的集合。 | 参数[] |
dockerFilePath | 相对于源上下文的 Docker 文件路径。 | string (必需) |
imageNames | 完全限定的映像名称,包括存储库和标记。 | string[] |
isPushEnabled | 此属性的值指示是否应将生成的映像推送到注册表。 | bool |
noCache | 此属性的值指示是否启用映像缓存。 | bool |
目标 | docker 生成的目标生成阶段的名称。 | 字符串 |
类型 | 步骤的类型。 | “Docker”(必需) |
EncodedTaskStep
名字 | 描述 | 价值 |
---|---|---|
encodedTaskContent | 模板/定义文件内容的 Base64 编码值。 | string (必需) |
encodedValuesContent | 参数/值文件内容的 Base64 编码值。 | 字符串 |
类型 | 步骤的类型。 | “EncodedTask”(必需) |
值 | 运行任务时可以传递的可重写值的集合。 | SetValue[] |
FileTaskStep
名字 | 描述 | 价值 |
---|---|---|
taskFilePath | 相对于源上下文的任务模板/定义文件路径。 | string (必需) |
类型 | 步骤的类型。 | “FileTask”(必需) |
值 | 运行任务时可以传递的可重写值的集合。 | SetValue[] |
valuesFilePath | 相对于源上下文的任务值/参数文件路径。 | 字符串 |
Microsoft.ContainerRegistry/registries/tasks
名字 | 描述 | 价值 |
---|---|---|
位置 | 资源的位置。 创建资源后,无法更改此更改。 | string (必需) |
名字 | 资源名称 | 字符串 约束: 最小长度 = 5 最大长度 = 50 模式 = ^[a-zA-Z0-9-_]*$ (必需) |
父母 | 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。 有关详细信息,请参阅 父资源外部的子资源。 |
类型资源的符号名称:注册表 |
性能 | 任务的属性。 | TaskProperties |
标签 | 资源标记 | 标记名称和值的字典。 请参阅模板 中的 |
PlatformProperties
名字 | 描述 | 价值 |
---|---|---|
建筑 | OS 体系结构。 | “amd64” “arm” “x86” |
操作系统 | 运行所需的操作系统类型。 | “Linux” “Windows”(必需) |
变体 | CPU 的变体。 | “v6” “v7” “v8” |
ResourceTags
名字 | 描述 | 价值 |
---|
SecretObject
名字 | 描述 | 价值 |
---|---|---|
类型 | 机密对象的类型,该对象确定机密对象的值必须如何 解释。 |
“Opaque” |
价值 | 机密的值。 将确定此值的格式 基于机密对象的类型。 如果类型为 Opaque,则该值将为 按原样使用,无需进行任何修改。 |
字符串 |
SetValue
名字 | 描述 | 价值 |
---|---|---|
isSecret | 用于指示值是否表示机密的标志。 | bool |
名字 | 可重写值的名称。 | string (必需) |
价值 | 可重写的值。 | string (必需) |
SourceProperties
名字 | 描述 | 价值 |
---|---|---|
分支 | 源代码的分支名称。 | 字符串 |
repositoryUrl | 源代码存储库的完整 URL | string (必需) |
sourceControlAuthProperties | 用于访问源代码存储库和设置的授权属性 通知的 webhook。 |
AuthInfo |
sourceControlType | 源代码管理服务的类型。 | “Github” “VisualStudioTeamService”(必需) |
SourceRegistryCredentials
名字 | 描述 | 价值 |
---|---|---|
loginMode | 确定源注册表登录范围的身份验证模式。 源注册表的凭据 将使用给定的范围生成。 这些凭据将用于登录 运行过程中的源注册表。 |
“Default” “None” |
SourceTrigger
名字 | 描述 | 价值 |
---|---|---|
名字 | 触发器的名称。 | string (必需) |
sourceRepository | 描述任务的源代码的属性。 | SourceProperties (必需) |
sourceTriggerEvents | 与触发器对应的源事件。 | 包含任一项的字符串数组: “commit” “pullrequest”(必需) |
地位 | 触发器的当前状态。 | “Disabled” “Enabled” |
TaskProperties
名字 | 描述 | 价值 |
---|---|---|
agentConfiguration | 运行代理的计算机配置。 | AgentProperties |
凭据 | 描述调用此运行时将使用的一组凭据的属性。 | 凭据 |
平台 | 运行必须针对的平台属性。 | PlatformProperties (必需) |
地位 | 任务的当前状态。 | “Disabled” “Enabled” |
步 | 任务步骤的属性。 | TaskStepProperties (必需) |
超时 | 运行超时(以秒为单位)。 | int 约束: 最小值 = 300 最大值 = 28800 |
触发 | 描述任务的所有触发器的属性。 | TriggerProperties |
TaskStepProperties
名字 | 描述 | 价值 |
---|---|---|
contextAccessToken | 与步骤上下文关联的令牌(git PAT 或存储帐户 blob 的 SAS 令牌)。 | 字符串 |
contextPath | 任务步骤的源上下文的 URL(绝对或相对)。 | 字符串 |
类型 | 对于 dockerBuildStep 类型,请设置为“Docker”。 对于 type EncodedTaskStep,设置为“EncodedTask” 。 对于 FileTaskStep类型,设置为“FileTask”。 | “Docker” “EncodedTask” “FileTask”(必需) |
TriggerProperties
名字 | 描述 | 价值 |
---|---|---|
baseImageTrigger | 基于基础映像依赖项的触发器。 | BaseImageTrigger |
sourceTriggers | 基于源代码存储库的触发器集合。 | SourceTrigger[] |
ARM 模板资源定义
可以使用目标操作部署注册表/任务资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.ContainerRegistry/registries/tasks 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.ContainerRegistry/registries/tasks",
"apiVersion": "2018-09-01",
"name": "string",
"location": "string",
"properties": {
"agentConfiguration": {
"cpu": "int"
},
"credentials": {
"customRegistries": {
"{customized property}": {
"password": {
"type": "string",
"value": "string"
},
"userName": {
"type": "string",
"value": "string"
}
}
},
"sourceRegistry": {
"loginMode": "string"
}
},
"platform": {
"architecture": "string",
"os": "string",
"variant": "string"
},
"status": "string",
"step": {
"contextAccessToken": "string",
"contextPath": "string",
"type": "string"
// For remaining properties, see TaskStepProperties objects
},
"timeout": "int",
"trigger": {
"baseImageTrigger": {
"baseImageTriggerType": "string",
"name": "string",
"status": "string"
},
"sourceTriggers": [
{
"name": "string",
"sourceRepository": {
"branch": "string",
"repositoryUrl": "string",
"sourceControlAuthProperties": {
"expiresIn": "int",
"refreshToken": "string",
"scope": "string",
"token": "string",
"tokenType": "string"
},
"sourceControlType": "string"
},
"sourceTriggerEvents": [ "string" ],
"status": "string"
}
]
}
},
"tags": {
"{customized property}": "string"
}
}
TaskStepProperties 对象
设置 类型 属性以指定对象的类型。
对于 Docker,请使用:
{
"arguments": [
{
"isSecret": "bool",
"name": "string",
"value": "string"
}
],
"dockerFilePath": "string",
"imageNames": [ "string" ],
"isPushEnabled": "bool",
"noCache": "bool",
"target": "string",
"type": "Docker"
}
对于 EncodedTask,请使用:
{
"encodedTaskContent": "string",
"encodedValuesContent": "string",
"type": "EncodedTask",
"values": [
{
"isSecret": "bool",
"name": "string",
"value": "string"
}
]
}
对于 FileTask,请使用:
{
"taskFilePath": "string",
"type": "FileTask",
"values": [
{
"isSecret": "bool",
"name": "string",
"value": "string"
}
],
"valuesFilePath": "string"
}
属性值
AgentProperties
名字 | 描述 | 价值 |
---|---|---|
中央处理器 | 在运行所需的内核数方面,CPU 配置。 | int |
论点
名字 | 描述 | 价值 |
---|---|---|
isSecret | 用于指示参数是否表示机密并想要从生成日志中删除的标志。 | bool |
名字 | 参数的名称。 | string (必需) |
价值 | 参数的值。 | string (必需) |
AuthInfo
名字 | 描述 | 价值 |
---|---|---|
expiresIn | 令牌保持有效时间(以秒为单位) | int |
refreshToken | 用于刷新访问令牌的刷新令牌。 | 字符串 |
范围 | 访问令牌的范围。 | 字符串 |
令 牌 | 用于访问源代码管理提供程序的访问令牌。 | string (必需) |
tokenType | 身份验证令牌的类型。 | “OAuth” “PAT”(必需) |
BaseImageTrigger
名字 | 描述 | 价值 |
---|---|---|
baseImageTriggerType | 基础映像依赖项更新的自动触发器的类型。 | “All” “Runtime”(必需) |
名字 | 触发器的名称。 | string (必需) |
地位 | 触发器的当前状态。 | “Disabled” “Enabled” |
凭据
名字 | 描述 | 价值 |
---|---|---|
customRegistries | 描述用于访问其他自定义注册表的凭据参数。 密钥 字典项的 |
CredentialsCustomRegistries |
sourceRegistry | 描述用于访问源注册表的凭据参数。 | SourceRegistryCredentials |
CredentialsCustomRegistries
名字 | 描述 | 价值 |
---|
CustomRegistryCredentials
名字 | 描述 | 价值 |
---|---|---|
密码 | 用于登录到自定义注册表的密码。 密码是机密 对象,允许通过多种方式为其提供值。 |
SecretObject |
userName | 用于登录到自定义注册表的用户名。 | SecretObject |
DockerBuildStep
名字 | 描述 | 价值 |
---|---|---|
参数 | 执行此生成步骤时要使用的重写参数的集合。 | 参数[] |
dockerFilePath | 相对于源上下文的 Docker 文件路径。 | string (必需) |
imageNames | 完全限定的映像名称,包括存储库和标记。 | string[] |
isPushEnabled | 此属性的值指示是否应将生成的映像推送到注册表。 | bool |
noCache | 此属性的值指示是否启用映像缓存。 | bool |
目标 | docker 生成的目标生成阶段的名称。 | 字符串 |
类型 | 步骤的类型。 | “Docker”(必需) |
EncodedTaskStep
名字 | 描述 | 价值 |
---|---|---|
encodedTaskContent | 模板/定义文件内容的 Base64 编码值。 | string (必需) |
encodedValuesContent | 参数/值文件内容的 Base64 编码值。 | 字符串 |
类型 | 步骤的类型。 | “EncodedTask”(必需) |
值 | 运行任务时可以传递的可重写值的集合。 | SetValue[] |
FileTaskStep
名字 | 描述 | 价值 |
---|---|---|
taskFilePath | 相对于源上下文的任务模板/定义文件路径。 | string (必需) |
类型 | 步骤的类型。 | “FileTask”(必需) |
值 | 运行任务时可以传递的可重写值的集合。 | SetValue[] |
valuesFilePath | 相对于源上下文的任务值/参数文件路径。 | 字符串 |
Microsoft.ContainerRegistry/registries/tasks
名字 | 描述 | 价值 |
---|---|---|
apiVersion | API 版本 | '2018-09-01' |
位置 | 资源的位置。 创建资源后,无法更改此更改。 | string (必需) |
名字 | 资源名称 | 字符串 约束: 最小长度 = 5 最大长度 = 50 模式 = ^[a-zA-Z0-9-_]*$ (必需) |
性能 | 任务的属性。 | TaskProperties |
标签 | 资源标记 | 标记名称和值的字典。 请参阅模板 中的 |
类型 | 资源类型 | “Microsoft.ContainerRegistry/registries/tasks” |
PlatformProperties
名字 | 描述 | 价值 |
---|---|---|
建筑 | OS 体系结构。 | “amd64” “arm” “x86” |
操作系统 | 运行所需的操作系统类型。 | “Linux” “Windows”(必需) |
变体 | CPU 的变体。 | “v6” “v7” “v8” |
ResourceTags
名字 | 描述 | 价值 |
---|
SecretObject
名字 | 描述 | 价值 |
---|---|---|
类型 | 机密对象的类型,该对象确定机密对象的值必须如何 解释。 |
“Opaque” |
价值 | 机密的值。 将确定此值的格式 基于机密对象的类型。 如果类型为 Opaque,则该值将为 按原样使用,无需进行任何修改。 |
字符串 |
SetValue
名字 | 描述 | 价值 |
---|---|---|
isSecret | 用于指示值是否表示机密的标志。 | bool |
名字 | 可重写值的名称。 | string (必需) |
价值 | 可重写的值。 | string (必需) |
SourceProperties
名字 | 描述 | 价值 |
---|---|---|
分支 | 源代码的分支名称。 | 字符串 |
repositoryUrl | 源代码存储库的完整 URL | string (必需) |
sourceControlAuthProperties | 用于访问源代码存储库和设置的授权属性 通知的 webhook。 |
AuthInfo |
sourceControlType | 源代码管理服务的类型。 | “Github” “VisualStudioTeamService”(必需) |
SourceRegistryCredentials
名字 | 描述 | 价值 |
---|---|---|
loginMode | 确定源注册表登录范围的身份验证模式。 源注册表的凭据 将使用给定的范围生成。 这些凭据将用于登录 运行过程中的源注册表。 |
“Default” “None” |
SourceTrigger
名字 | 描述 | 价值 |
---|---|---|
名字 | 触发器的名称。 | string (必需) |
sourceRepository | 描述任务的源代码的属性。 | SourceProperties (必需) |
sourceTriggerEvents | 与触发器对应的源事件。 | 包含任一项的字符串数组: “commit” “pullrequest”(必需) |
地位 | 触发器的当前状态。 | “Disabled” “Enabled” |
TaskProperties
名字 | 描述 | 价值 |
---|---|---|
agentConfiguration | 运行代理的计算机配置。 | AgentProperties |
凭据 | 描述调用此运行时将使用的一组凭据的属性。 | 凭据 |
平台 | 运行必须针对的平台属性。 | PlatformProperties (必需) |
地位 | 任务的当前状态。 | “Disabled” “Enabled” |
步 | 任务步骤的属性。 | TaskStepProperties (必需) |
超时 | 运行超时(以秒为单位)。 | int 约束: 最小值 = 300 最大值 = 28800 |
触发 | 描述任务的所有触发器的属性。 | TriggerProperties |
TaskStepProperties
名字 | 描述 | 价值 |
---|---|---|
contextAccessToken | 与步骤上下文关联的令牌(git PAT 或存储帐户 blob 的 SAS 令牌)。 | 字符串 |
contextPath | 任务步骤的源上下文的 URL(绝对或相对)。 | 字符串 |
类型 | 对于 dockerBuildStep 类型,请设置为“Docker”。 对于 type EncodedTaskStep,设置为“EncodedTask” 。 对于 FileTaskStep类型,设置为“FileTask”。 | “Docker” “EncodedTask” “FileTask”(必需) |
TriggerProperties
名字 | 描述 | 价值 |
---|---|---|
baseImageTrigger | 基于基础映像依赖项的触发器。 | BaseImageTrigger |
sourceTriggers | 基于源代码存储库的触发器集合。 | SourceTrigger[] |
用法示例
Terraform (AzAPI 提供程序)资源定义
可以使用目标操作部署注册表/任务资源类型:
- 资源组
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.ContainerRegistry/registries/tasks 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.ContainerRegistry/registries/tasks@2018-09-01"
name = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
agentConfiguration = {
cpu = int
}
credentials = {
customRegistries = {
{customized property} = {
password = {
type = "string"
value = "string"
}
userName = {
type = "string"
value = "string"
}
}
}
sourceRegistry = {
loginMode = "string"
}
}
platform = {
architecture = "string"
os = "string"
variant = "string"
}
status = "string"
step = {
contextAccessToken = "string"
contextPath = "string"
type = "string"
// For remaining properties, see TaskStepProperties objects
}
timeout = int
trigger = {
baseImageTrigger = {
baseImageTriggerType = "string"
name = "string"
status = "string"
}
sourceTriggers = [
{
name = "string"
sourceRepository = {
branch = "string"
repositoryUrl = "string"
sourceControlAuthProperties = {
expiresIn = int
refreshToken = "string"
scope = "string"
token = "string"
tokenType = "string"
}
sourceControlType = "string"
}
sourceTriggerEvents = [
"string"
]
status = "string"
}
]
}
}
})
}
TaskStepProperties 对象
设置 类型 属性以指定对象的类型。
对于 Docker,请使用:
{
arguments = [
{
isSecret = bool
name = "string"
value = "string"
}
]
dockerFilePath = "string"
imageNames = [
"string"
]
isPushEnabled = bool
noCache = bool
target = "string"
type = "Docker"
}
对于 EncodedTask,请使用:
{
encodedTaskContent = "string"
encodedValuesContent = "string"
type = "EncodedTask"
values = [
{
isSecret = bool
name = "string"
value = "string"
}
]
}
对于 FileTask,请使用:
{
taskFilePath = "string"
type = "FileTask"
values = [
{
isSecret = bool
name = "string"
value = "string"
}
]
valuesFilePath = "string"
}
属性值
AgentProperties
名字 | 描述 | 价值 |
---|---|---|
中央处理器 | 在运行所需的内核数方面,CPU 配置。 | int |
论点
名字 | 描述 | 价值 |
---|---|---|
isSecret | 用于指示参数是否表示机密并想要从生成日志中删除的标志。 | bool |
名字 | 参数的名称。 | string (必需) |
价值 | 参数的值。 | string (必需) |
AuthInfo
名字 | 描述 | 价值 |
---|---|---|
expiresIn | 令牌保持有效时间(以秒为单位) | int |
refreshToken | 用于刷新访问令牌的刷新令牌。 | 字符串 |
范围 | 访问令牌的范围。 | 字符串 |
令 牌 | 用于访问源代码管理提供程序的访问令牌。 | string (必需) |
tokenType | 身份验证令牌的类型。 | “OAuth” “PAT”(必需) |
BaseImageTrigger
名字 | 描述 | 价值 |
---|---|---|
baseImageTriggerType | 基础映像依赖项更新的自动触发器的类型。 | “All” “Runtime”(必需) |
名字 | 触发器的名称。 | string (必需) |
地位 | 触发器的当前状态。 | “Disabled” “Enabled” |
凭据
名字 | 描述 | 价值 |
---|---|---|
customRegistries | 描述用于访问其他自定义注册表的凭据参数。 密钥 字典项的 |
CredentialsCustomRegistries |
sourceRegistry | 描述用于访问源注册表的凭据参数。 | SourceRegistryCredentials |
CredentialsCustomRegistries
名字 | 描述 | 价值 |
---|
CustomRegistryCredentials
名字 | 描述 | 价值 |
---|---|---|
密码 | 用于登录到自定义注册表的密码。 密码是机密 对象,允许通过多种方式为其提供值。 |
SecretObject |
userName | 用于登录到自定义注册表的用户名。 | SecretObject |
DockerBuildStep
名字 | 描述 | 价值 |
---|---|---|
参数 | 执行此生成步骤时要使用的重写参数的集合。 | 参数[] |
dockerFilePath | 相对于源上下文的 Docker 文件路径。 | string (必需) |
imageNames | 完全限定的映像名称,包括存储库和标记。 | string[] |
isPushEnabled | 此属性的值指示是否应将生成的映像推送到注册表。 | bool |
noCache | 此属性的值指示是否启用映像缓存。 | bool |
目标 | docker 生成的目标生成阶段的名称。 | 字符串 |
类型 | 步骤的类型。 | “Docker”(必需) |
EncodedTaskStep
名字 | 描述 | 价值 |
---|---|---|
encodedTaskContent | 模板/定义文件内容的 Base64 编码值。 | string (必需) |
encodedValuesContent | 参数/值文件内容的 Base64 编码值。 | 字符串 |
类型 | 步骤的类型。 | “EncodedTask”(必需) |
值 | 运行任务时可以传递的可重写值的集合。 | SetValue[] |
FileTaskStep
名字 | 描述 | 价值 |
---|---|---|
taskFilePath | 相对于源上下文的任务模板/定义文件路径。 | string (必需) |
类型 | 步骤的类型。 | “FileTask”(必需) |
值 | 运行任务时可以传递的可重写值的集合。 | SetValue[] |
valuesFilePath | 相对于源上下文的任务值/参数文件路径。 | 字符串 |
Microsoft.ContainerRegistry/registries/tasks
名字 | 描述 | 价值 |
---|---|---|
位置 | 资源的位置。 创建资源后,无法更改此更改。 | string (必需) |
名字 | 资源名称 | 字符串 约束: 最小长度 = 5 最大长度 = 50 模式 = ^[a-zA-Z0-9-_]*$ (必需) |
parent_id | 此资源的父资源的 ID。 | 类型资源的 ID:注册表 |
性能 | 任务的属性。 | TaskProperties |
标签 | 资源标记 | 标记名称和值的字典。 |
类型 | 资源类型 | “Microsoft.ContainerRegistry/registries/tasks@2018-09-01” |
PlatformProperties
名字 | 描述 | 价值 |
---|---|---|
建筑 | OS 体系结构。 | “amd64” “arm” “x86” |
操作系统 | 运行所需的操作系统类型。 | “Linux” “Windows”(必需) |
变体 | CPU 的变体。 | “v6” “v7” “v8” |
ResourceTags
名字 | 描述 | 价值 |
---|
SecretObject
名字 | 描述 | 价值 |
---|---|---|
类型 | 机密对象的类型,该对象确定机密对象的值必须如何 解释。 |
“Opaque” |
价值 | 机密的值。 将确定此值的格式 基于机密对象的类型。 如果类型为 Opaque,则该值将为 按原样使用,无需进行任何修改。 |
字符串 |
SetValue
名字 | 描述 | 价值 |
---|---|---|
isSecret | 用于指示值是否表示机密的标志。 | bool |
名字 | 可重写值的名称。 | string (必需) |
价值 | 可重写的值。 | string (必需) |
SourceProperties
名字 | 描述 | 价值 |
---|---|---|
分支 | 源代码的分支名称。 | 字符串 |
repositoryUrl | 源代码存储库的完整 URL | string (必需) |
sourceControlAuthProperties | 用于访问源代码存储库和设置的授权属性 通知的 webhook。 |
AuthInfo |
sourceControlType | 源代码管理服务的类型。 | “Github” “VisualStudioTeamService”(必需) |
SourceRegistryCredentials
名字 | 描述 | 价值 |
---|---|---|
loginMode | 确定源注册表登录范围的身份验证模式。 源注册表的凭据 将使用给定的范围生成。 这些凭据将用于登录 运行过程中的源注册表。 |
“Default” “None” |
SourceTrigger
名字 | 描述 | 价值 |
---|---|---|
名字 | 触发器的名称。 | string (必需) |
sourceRepository | 描述任务的源代码的属性。 | SourceProperties (必需) |
sourceTriggerEvents | 与触发器对应的源事件。 | 包含任一项的字符串数组: “commit” “pullrequest”(必需) |
地位 | 触发器的当前状态。 | “Disabled” “Enabled” |
TaskProperties
名字 | 描述 | 价值 |
---|---|---|
agentConfiguration | 运行代理的计算机配置。 | AgentProperties |
凭据 | 描述调用此运行时将使用的一组凭据的属性。 | 凭据 |
平台 | 运行必须针对的平台属性。 | PlatformProperties (必需) |
地位 | 任务的当前状态。 | “Disabled” “Enabled” |
步 | 任务步骤的属性。 | TaskStepProperties (必需) |
超时 | 运行超时(以秒为单位)。 | int 约束: 最小值 = 300 最大值 = 28800 |
触发 | 描述任务的所有触发器的属性。 | TriggerProperties |
TaskStepProperties
名字 | 描述 | 价值 |
---|---|---|
contextAccessToken | 与步骤上下文关联的令牌(git PAT 或存储帐户 blob 的 SAS 令牌)。 | 字符串 |
contextPath | 任务步骤的源上下文的 URL(绝对或相对)。 | 字符串 |
类型 | 对于 dockerBuildStep 类型,请设置为“Docker”。 对于 type EncodedTaskStep,设置为“EncodedTask” 。 对于 FileTaskStep类型,设置为“FileTask”。 | “Docker” “EncodedTask” “FileTask”(必需) |
TriggerProperties
名字 | 描述 | 价值 |
---|---|---|
baseImageTrigger | 基于基础映像依赖项的触发器。 | BaseImageTrigger |
sourceTriggers | 基于源代码存储库的触发器集合。 | SourceTrigger[] |