0

How to connect ACR with Azure devops pipeline such that whenever there is a new image in ACR azure devops pipeline trigger. Webhook is one option but how to setup it what should be URI need to specify to send post notification and then how to use webhook in Devops pipeline. Thanks in advance

I have tried to create webhook in acr but not sure what uri to use for post notification and then what uri should be given in Azure devops service hook . Also how to declare this in yaml file

Vaish
  • 1

1 Answers1

0

You can define a container resource and set the trigger param to true, as mentioned in the docs here.

From the doc:

resources:          # types: pipelines | repositories | containers | builds | packages
  containers:
  - container: string # identifier for the container resource      
    type: string # type of the registry like ACR, GCR etc. 
    azureSubscription: string # Azure subscription (ARM service connection) for container registry;
    resourceGroup: string # resource group for your ACR
    registry: string # registry for container images
    repository: string # name of the container image repository in ACR
    trigger: # Triggers aren't enabled by default and need to be set explicitly
      enabled: boolean # set to 'true' to trigger on all image tags if 'tags' is unset.
      tags:
        include: [ string ]  # image tags to consider the trigger events, optional; defaults to any new tag
        exclude: [ string ]  # image tags on discard the trigger events, optional; defaults to none
akathimi
  • 1,393
  • 11