resources.containers.container.trigger 定义

指定容器资源的触发条件。

引用此定义的定义: resources.containers.container

实现形式

实现 描述
触发器:已启用,标记 指定要触发的标记的列表。
trigger: none |真 指定 none 以禁用或指定 true 以在所有映像标记上触发。

备注

指定 none 可禁用,将 true 指定为所有映像标记触发,或使用完整语法,如以下示例中所述。

触发器:已启用,标记

配置触发运行的标记。

trigger:
  enabled: boolean # Whether the trigger is enabled; defaults to true.
  tags: includeExcludeStringFilters | [ string ] # Tag names to include or exclude for triggering a run.

属性

enabled布尔值
是否启用触发器;默认为 true。

tagsincludeExcludeStringFilters
要包括或排除以触发运行的标记名称。

示例

在以下示例中,为匹配 production*的标记启用了触发器。

resources:         
  containers:
  - container: petStore      
    type: ACR  
    azureSubscription: ContosoARMConnection
    resourceGroup: ContosoGroup
    registry: petStoreRegistry
    repository: myPets
    trigger: 
      tags:
        include: 
        - production*

trigger: none |真

指定 none 以禁用或指定 true 以在所有映像标记上触发。

trigger: none | true # Specify none to disable or true to trigger on all image tags.

trigger 字符串。 允许的值:无 |真。

指定 none 以禁用或指定 true 以在所有映像标记上触发。

备注

指定 none 以禁用触发器,或 true 指定 以启用。 如果未指定,则默认设置为 none。 若要基于特定标记配置触发器,请参阅以下部分。

示例

resources:         
  containers:
  - container: petStore      
    type: ACR  
    azureSubscription: ContosoARMConnection
    resourceGroup: ContosoGroup
    registry: petStoreRegistry
    repository: myPets
    trigger: 
      tags: none # Triggers disabled
resources:         
  containers:
  - container: petStore      
    type: ACR  
    azureSubscription: ContosoARMConnection
    resourceGroup: ContosoGroup
    registry: petStoreRegistry
    repository: myPets
    trigger: 
      tags: true # Triggers enabled for all tags

另请参阅