1
votes

I've recently set up an Azure pipeline using the following azure-pipelines.yml file in the master branch:

trigger:
- master
- feature/*

pool:
  vmImage: 'ubuntu-latest'

variables:
  buildConfiguration: 'Release'

steps:
- script: dotnet build --configuration $(buildConfiguration)
  displayName: 'dotnet build $(buildConfiguration)'

I've also tried these two syntax examples for the trigger to no avail as well as removing the trigger completely.

trigger:
  branches:
    include:
    - master
    - feature/*
trigger:
  branches:
    include: ['*']

I've linked this to a GitHub repo where I created a branch called feature/cool_feature.

According to all of the docs I've read, I should be able to place the YAML file in the master branch which should start a build for both my branches. But all I can get this to do is start a build when a commit is made in the master branch.

The only want I could get the build to trigger is if I put another azure-pipelines.yml file inside of that branch.

Is this no longer the case or am I doing something wrong?

1
Your syntax looks right. Is the repo public? - tiberriver256

1 Answers

1
votes

Apparently, you must have another copy of the master's azure-pipelines.yml file in the branch for this to work.