3

Recently I updated my Azure DevOps CI pipeline from the classic previous system to the new yaml file. It seems I have some issue to properly setup the trigger.

Let me show you the error message first then a will give you my full yaml file.

I already read the official documentation and already tried to fix this with many variations but I don't get it. Nothing seems to work.

Some recent issues detected related to pipeline trigger.

and the details

Trigger issues

and my yaml file:

# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4

trigger:
  branches:
   include:
     - master
     - release/*

pool:
  name: Hosted VS2017
  demands:
  - msbuild
  - visualstudio
  - vstest

name: 3.$(Date:yy).$(BuildID)

variables:
  
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1
  displayName: 'Use NuGet 4.4.1'
  inputs:
    versionSpec: 4.4.1

- task: NuGetCommand@2
  displayName: 'NuGet restore'
  inputs:
    restoreSolution: $(Solution)

- task: VSBuild@1
  displayName: 'Build solution'
  inputs:
    solution: $(Solution)
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'

- task: VSTest@2
  displayName: 'Test Assemblies'
  inputs:
    testAssemblyVer2: |
     **\$(BuildConfiguration)\*test*.dll
     !**\obj\**
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'
    diagnosticsEnabled: True

- task: PublishSymbols@2
  displayName: 'Publish symbols path'
  inputs:
    SearchPattern: '**\bin\**\*.pdb'
    PublishSymbols: false
  continueOnError: true

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact'
  inputs:
    PathtoPublish: '$(build.artifactstagingdirectory)'
    ArtifactName: '$(Parameters.ArtifactName)'
  condition: succeededOrFailed()

What is wrong in this trigger section. Is it because of the '*'?

Bastien Vandamme
  • 17,659
  • 30
  • 118
  • 200
  • The documentation of Microsoft: https://learn.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops – Bastien Vandamme Dec 21 '21 at 00:53
  • 1
    This might be helpful and would point towards that the branch where the pipeline is trying to clone the repository from is deleted/default branch is deleted. The controls related to that are not in the yaml file and are rather well hidden. https://stackoverflow.com/a/67830237/11034408 – JukkaK Dec 21 '21 at 16:14

1 Answers1

6

We're getting this issue too since yesterday for no reason. This appears to be a bug with Azure DevOps, here is a link to an issue currently with Microsoft: https://developercommunity.visualstudio.com/t/Some-recent-issues-detected-related-to-p/1620293?space=21&q=Some+recent+issues+detected+related+to+pipeline+trigger

Jack S
  • 181
  • 1
  • 12