0
votes

I have four YAML "release" pipelines where I use the same YAML syntax to define a continuation trigger. Here is the YAML definition for the trigger.

resources:
  pipelines:
  - pipeline: Build  # Name of the pipeline resource
    source: BuildPipeline  # Name of the pipeline as registered with Azure DevOps
    trigger: true

Not really sure about this syntax where I don't specify any branch but everything was working fine till recently. More recently I updated two of the YAML release pipelines and they now are not getting triggered when the build pipeline completes. All pipelines if executed manually work fine.

All release pipelines have the same YAML for the continuation trigger definition (see above) and have the same branch set for "Default branch for manual and scheduled builds".

I don't know how to investigate why some of the release pipelines are not triggered (any log available somewhere?) and I don't see them executed and failing, they simply are not being triggered. How do I investigate this issue?

2
Are the two YAML release pipelines in the same project as triggering pipeline BuildPipeline?If the triggering pipeline is in another Azure DevOps project, you must specify the project name using project: OtherProjectName.Levi Lu-MSFT
Some project. Same branch. These pipelines all use the same exact syntax for the pipeline continuation trigger (see my initial post) and all of them have the same branch set for "Default branch for manual and scheduled builds". As said some are triggered, others are not. All of them run fine if executed manually (so no errors in the pipelines). All of them use template pipelines via the extends keyword and pipelines that are not being triggered started doing so when I had to update the template pipeline they use.whatever
So you are saying these pipelines were not get triggered after you updated the template pipeline they use?Levi Lu-MSFT
Yes. All pipelines using the pipeline continuation trigger worked fine initially. Some of them stopped being triggered after having updated the template pipelines invoked via the extends keyword.whatever
I wonder, is it possible for a pipeline to start fine if triggered manually and fail at starting when triggered otherwise like via a pipeline completion trigger?whatever

2 Answers

0
votes

For your question about investigating the logs - you can see what pipeline runs were created, but unfortunately you can't see what wasn't. So far as Azure DevOps is concerned, if "nothing occurred" to set off a trigger, then there's nothing to log.

As for the pipelines themselves not triggering, from the pipeline editor, check the trigger settings to ensure that nothing is set there - UI and YAML settings tend to cancel one another out:

Trigger settings

Finally, if you want to specify a branch, you can use some combination of the following options:

resources:
  pipelines:
  - pipeline: Build  # Name of the pipeline resource
    source: BuildPipeline  # Name of the pipeline as registered with Azure DevOps
    trigger:
      branches:
        include: # branch names which will trigger a build
        exclude: # branch names which will not
      tags:
        include: # tag names which will trigger a build
        exclude: # tag names which will not
      paths:
        include: # file paths which must match to trigger a build
        exclude: # file paths which will not trigger a build
0
votes

I believe I found the issue and it's the removal of the following statements from my deploy pipelines

pool:
  vmImage: windows-2019

I removed these statements because I transformed all jobs into deployment jobs as follows

- deployment: MyDeployJob
  displayName: 'bla bla bla'
  environment:
    name: ${{ parameters.AzureDevopsEnv }}
    resourceType: VirtualMachine
    resourceName: ${{ parameters.AzureDevopsVM }}

The pipelines with no pool statement run perfectly well if started manually but I'm convinced fail at being triggered if started via the pipeline completion trigger. I do not understand this behavior but I placed the pool statement back in all deploy pipelines and all are now getting triggered as the build pipeline completes.