Azure Pipeline to trigger Pipeline using YAML

后端 未结 4 1222
遇见更好的自我
遇见更好的自我 2021-02-05 07:12

Attempting to trigger an Azure pipeline when another pipeline has been completed using a YAML. There\'s documentation indicating that you can add a pipeline resource with:

4条回答
  •  清歌不尽
    2021-02-05 07:53

    The resources are not for the Build Completion trigger. according to the docs the build completion trigger not yet supported in YAML syntax.

    After you create the YAML pipeline you can go to the classic editor (click on settings or variables) and there create the trigger.

    Edit:

    Now you need to click on the "Triggers":

    And then:

    Second Edit:

    Microsoft added this feature also the YAML :) see here:

    # this is being defined in app-ci pipeline
    resources:
      pipelines:
      - pipeline: security-lib
        source: security-lib-ci
        trigger: 
          branches:
          - releases/*
          - master
    

    In the above example, we have two pipelines - app-ci and security-lib-ci. We want the app-ci pipeline to run automatically every time a new version of the security library is built in master or a release branch.

提交回复
热议问题