Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps pipeline trigger issue message not going away

Our team is implementing an Azure DevOps testing pipeline. After our initial commit to create the pipeline .yml file this error message was displayed. After looking into it, I realized I forgot to include the trigger in the .yml. However after adding, it this error message hasn't gone away. The pipeline is working as expected though, we are just using a manual trigger which is shown below. The only listed issue is from the our original commit. Is there a way I can acknowledge this error to make it go away or am I potentially missing a different error that I just haven't noticed yet? Thanks for any help in advance, please let me know if I can provide any additional information.

Here are the error messages that I am seeing when I view the runs of that pipeline. I also included a screen shot of how I'm setting up my trigger. enter image description here

enter image description here

Edit: As request I included the actual .yml file code below with slight naming modifications. We do have some custom plugins such as creating files for files that are untracked but still needed to be created. So you might need to remove those to test this.

trigger:
- none

pool:
  name: myPool
  demands:
  - msbuild
  - visualstudio

steps:

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

- task: NuGetCommand@2
  displayName: 'NuGet restore'
  inputs:
    restoreSolution: '$(Parameters.solution)'

- task: eliostruyf.build-task.custom-build-task.file-creator@6
  displayName: 'Create Connection Strings file'
  inputs:
    filepath: '$(System.DefaultWorkingDirectory)/ID_Web/config/ConnectionStrings.config'
    filecontent: |
     <connectionStrings>
     
     </connectionStrings>
     
    endWithNewLine: true

- task: eliostruyf.build-task.custom-build-task.file-creator@6
  displayName: 'Create Developer Settings File'
  inputs:
    filepath: '$(System.DefaultWorkingDirectory)/ID_Web/config/developerAppSettings.config'
    filecontent: |
     <appSettings>

     </appSettings>
    endWithNewLine: true


- task: eliostruyf.build-task.custom-build-task.file-creator@6
  condition: contains(variables['Agent.Name'], '1')
  displayName: 'Create Developer Integration Setting for agent 1'
  inputs:
    filepath: '$(System.DefaultWorkingDirectory)/ID_Test/config/developerIntegrationSettings.config'
    filecontent: |
     <developerIntegrationSettings>
        <add key="ModelsIntegrationTestDb" value="Models_IntegrationTest_BuildAgent1"/>
        <add key="ErrorsIntegrationTestDb" value="Errors_IntegrationTest_BuildAgent1"/>
     </developerIntegrationSettings>
     
    endWithNewLine: true


- task: VisualStudioTestPlatformInstaller@1
  displayName: 'Visual Studio Test Platform Installer'
  inputs:
    versionSelector: latestStable

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

# Run all unit tests in parallel
- task: VSTest@2
  displayName: 'Run Unit Tests'
  inputs:
    testAssemblyVer2: |
     **\*ID_Test*.dll
     !**\*TestAdapter.dll
     !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)/ID_Test'
    testFiltercriteria: '(FullyQualifiedName!~Integration & FullyQualifiedName!~Ioc)'
    runOnlyImpactedTests: false
    vsTestVersion: toolsInstaller
    runSettingsFile: 'ID_Test/.runsettings'
    runInParallel: true
    runTestsInIsolation: false
    codeCoverageEnabled: false
    testRunTitle: 'Unit Tests'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'
    diagnosticsEnabled: true
    rerunFailedTests: true

# Run integration tests serially
- task: VSTest@2
  displayName: 'Run Integration Tests'
  inputs:
    testAssemblyVer2: |
     **\*ID_Test*.dll
     !**\*TestAdapter.dll
     !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)/ID_Test'
    testFiltercriteria: '(FullyQualifiedName~Integration | FullyQualifiedName~Ioc)'
    runOnlyImpactedTests: false
    vsTestVersion: toolsInstaller
    runSettingsFile: 'ID_Test/.runsettings'
    runTestsInIsolation: true
    codeCoverageEnabled: false
    testRunTitle: 'Integration Tests'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'
    diagnosticsEnabled: true
    rerunFailedTests: true

# Clean agent directories
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
  displayName: 'Clean Agent Directories'

Edit (2): Included below is a screen shot of what I am using for trigger settings now, originally it was unchecked. Checking it doesn't seem to have any affect though. enter image description here

like image 398
Andrew Avatar asked Nov 11 '20 16:11

Andrew


People also ask

How do I enable debug mode in Azure pipeline?

To configure verbose logs for a single run, you can start a new build by choosing Run pipeline and selecting Enable system diagnostics, Run. To configure verbose logs for all runs, you can add a variable named system. debug and set its value to true .

Are Azure Devops release Pipelines deprecated?

Draft releases are deprecated in Azure Pipelines because you can change variables while you're creating the release. Creating a draft release allows you to edit some settings for the release and tasks, depending on your role permissions before you start the deployment.

How do you trigger release pipeline in Azure Devops?

Select trigger: Set the trigger that will start the deployment to this stage automatically. Select "Release" to deploy to the stage every time a new release is created. Use the "Stage" option to deploy after deployments to selected stages are successful. To allow only manual deployments, select "Manual".


Video Answer


2 Answers

I had the same and was about to curl up in a ball and cry when I found out the real issue. As the wonderful message is saying, it has absolutely nothing to do with trigger :)

I assume you created a new branch with your YAML file for testing purpose before merging it to master. So you need to setup your build to point to this branch because the file doesn't exist on your main branch. Here the steps :

  • Edit your pipeline
  • Click the 3 dots on top right > Triggers
  • Click YAML tab > Get sources
  • Change the 'Default branch for manual and scheduled builds' to point to the branch where your .yml file is

enter image description here

like image 146
Christophe P Avatar answered Sep 22 '22 19:09

Christophe P


So we gave up on this problem since it wasn't having any effect and we couldn't find the problem. After about a week or two it just stopped showing up. So I assume this was just some quirk with the Azure DevOps and not a problem with the pipeline itself.

like image 25
Andrew Avatar answered Sep 25 '22 19:09

Andrew