简体   繁体   中英

Multiple wildcard trigger in Azure DevOps build

I have a yml file which has this for the trigger:

trigger:
  branches:
   include: [develop, release/*]

however, when I make a new branch off of develop and call the branch " ReleaseTest ", then commit and push code to that branch, my build isn't being triggered. Is the syntax incorrect?

My goal is to have one yml which is triggered by both commits to the develop branch and any release branch which we may make in the future, and set the appropriate build configs based on what branch it was triggered by.

The syntax is incorrect. include: [] is not supported in azure pipeline yaml. You should define the array in azure devops yaml like below:

trigger:
  branches:
    include:
    - develop
    - release/*
    - Release/* #trigger branch is case sensitive

See document here for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM