Azure Devops Pipeline is getting failed in Dot Test release Stage

Chamakura 21 Reputation points
2022-08-24T14:25:54.833+00:00

Can someone help me with Azure devops pipeline is getting failed at dotnet test release.

build.yaml file

trigger:
branches:
include:

  • main
    pool:
    name: ctg-az-win
    variables:
  • group: Object-DEV
  • group: ObjectAPI-Dev
  • name: buildConfiguration
    value: 'Release'
  • name: artifactName
    value: 'TemplateApp'
    stages:
  • stage: CI
    displayName: Continuous Integration
    jobs:
  • job: build_and_package_app
    displayName: Build and Package App
    steps:
  • task: NuGetAuthenticate@0
  • task: CmdLine@2
    displayName: 'dotnet restore $(buildConfiguration) --interactive'
    inputs:
    script: dotnet restore
  • task: DotNetCoreCLI@2
    displayName: 'dotnet build $(buildConfiguration)'
    inputs:
    command: 'build'
    projects: '**/*.csproj'
    arguments: '--configuration $(buildConfiguration)'
  • task: PowerShell@2
    displayName: Print environment variables
    inputs:
    targetType: 'inline'
    script: |
    Get-ChildItem -Path Env:\ | Format-List
  • task: DotNetCoreCLI@2
    displayName: 'dotnet test $(buildConfiguration)'
    env:
    DatabaseConnectionString: $(DatabaseConnectionString)
    LiteDatabaseConnectionString: $(LiteDatabaseConnectionString)
    inputs:
    command: test
    projects: '**/Tests/.csproj'
    arguments: '--configuration $(buildConfiguration) --collect "Code coverage"'
  • task: DotNetCoreCLI@2
    displayName: 'dotnet publish $(buildConfiguration)'
    inputs:
    command: publish
    publishWebProjects: True
    arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
    zipAfterPublish: True
  • task: PublishBuildArtifacts@1
    displayName: 'Publish built libraries into azure artifacts.'
    inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: '$(artifactName)'
    publishLocation: 'Container'
  • task: CopyFiles@2
    displayName: 'Copy files from ops folder $(buildConfiguration)'
    inputs:
    SourceFolder: '$(Build.Repository.LocalPath)/ops'
    Contents: '**'
    TargetFolder: '$(Build.ArtifactStagingDirectory)/ops'
    OverWrite: true
  • task: PublishBuildArtifacts@1
    displayName: 'Publish ops folder into azure artifacts $(buildConfiguration).'
    inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)/ops'
    ArtifactName: '$(artifactName)-Ops'
    publishLocation: 'Container'

Logs for the failure

2022-08-16T21:06:55.8005651Z Failed! - Failed: 62, Passed: 1768, Skipped: 0, Total: 1830, Duration: 2 m 56 s - Objects.IntegrationTests.dll (net6.0)
2022-08-16T21:06:55.8840048Z ##[debug]Exit code 1 received from tool 'C:\Program Files\dotnet\dotnet.exe'
2022-08-16T21:06:55.8843131Z ##[debug]STDIO streams have closed for tool 'C:\Program Files\dotnet\dotnet.exe'
2022-08-16T21:06:55.8880512Z ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
2022-08-16T21:06:55.8891367Z ##[debug]Processed: ##vso[task.issue type=error;]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1

234553-failed.png

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,918 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dave Patrick 426.1K Reputation points MVP
    2022-08-24T14:44:18.02+00:00

    Devops / TFS is not currently supported here on Q&A. The product group for Azure DevOps / TFS actively monitors questions over at
    https://developercommunity.visualstudio.com/report?space=21&entry=problem
    https://developercommunity.visualstudio.com/report?space=22&entry=problem
    https://azure.microsoft.com/en-in/support/devops/

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

0 additional answers

Sort by: Most helpful