resources.containers.container.trigger 定義

指定容器資源的觸發條件。

參考此定義的定義: resources.containers.container

實作

實作 描述
觸發程式:已啟用,標記 指定要觸發的標籤清單。
觸發程式:無 |真 請指定 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*

觸發程式:無 |真

請指定 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

另請參閱