I will begin by saying – this issue is not preventing my pipeline from running correctly, it runs, as expected – it even handles all my artifact creation and prep (so I can use a release to drop the bits when needed), again; I am not doing anything out of the ordinary, just building a 3 sites and deploying them to IIS on a webserver.
Our Pipelines list in Azure DevOps is showing an odd error message that is not giving up it’s secrets. So I made some changes to my Azure-Pipelines.yml file that controls the build/deployment etc… in Azure Dev Ops. After I made these changes, I started seeing an error message show up on the top of our Pipelines list. It states
“Some recent issues detected related to pipeline trigger.”
Opening the issue, by clicking the “View Details” button on the right side of this message I see the details (of which there isn’t much to speak of). I see the following…
My YML file was using the task name I put in (which appears to be a predefined task in Azure DevOps, it’s been since Cruise Control since I last had to do my own CI setup work, forgive my lack of knowledge).
Here is our YML file – it’s pretty basic. (food for thought… why does it almost seem like there might be some kind of non-printable ASCII character messing up the parsing on this? I have no earthly idea).
There isn’t anything sensitive on this YML file so I didn’t even need to redact anything – WYSIWYG.
Anyone else see what I am doing incorrectly on this YML file for Azure? I will point out the obvious that there are more than one task named things like “DotNetCoreCLI@2”, I will mention that previously we had 2 tasks in our last YML file that used this twice – no issue, so is adding a 3rd the straw that broke the camels back? It seems completely unintuitive IMHO…
Our old YML file looked like this….
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- main
- develop
- feature/*
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
pdxUiProj: 'Priority.Dispatch.UI/Priority.Dispatch.UI.PDS.csproj'
pdxUiProjNuGetConfig: 'Priority.Dispatch.UI.PDS/NuGet.config'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 8'
inputs:
version: 8.0.x
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
# arguments: '--runtime win'
projects: '**/*.csproj'
feedsToUse: 'config'
nugetConfigPath: '$(pdxUiProjNuGetConfig)'
externalFeedCredentials: 'TelerikWithNuGetKey'
arguments: '-p:TargetFramework=net8.0'
- task: DotNetCoreCLI@2
displayName: 'dotnet build $(buildConfiguration)'
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'dotnet test $(buildConfiguration)'
inputs:
command: 'test'
projects: '**/*.csproj'
arguments: '--configuration $buildConfiguration) --collect "Code coverage"'
# Publish projects to specified folder.
- task: DotNetCoreCLI@2
displayName: 'Api dotnet publish $(buildConfiguration)'
inputs:
command: 'publish'
projects: 'Priority.Dispatch.Api/Priority.Dispatch.Api.csproj'
arguments: '-p:PublishProfile=FolderProfile --configuration $(buildConfiguration)'
zipAfterPublish: false
modifyOutputPath: true
- task: DotNetCoreCLI@2
displayName: 'Hub dotnet publish $(buildConfiguration)'
inputs:
command: 'publish'
projects: 'Priority.Dispatch.Hub/Priority.Dispatch.Hub.csproj'
arguments: '-p:PublishProfile=FolderProfile --configuration $(buildConfiguration)'
zipAfterPublish: false
modifyOutputPath: true
- task: PublishPipelineArtifact@1
displayName: 'Api Publish Pipeline Artifact'
inputs:
targetPath: $(System.DefaultWorkingDirectory)/Priority.Dispatch.Api/bin/Release/net8.0/win-x64/publish
artifactName: Api
- task: PublishPipelineArtifact@1
displayName: 'Hub Publish Pipeline Artifact'
inputs:
targetPath: $(System.DefaultWorkingDirectory)/Priority.Dispatch.Hub/bin/Release/net8.0/win-x64/publish
artifactName: Hub
and this is the new one (just added a couple tasks – one to build the website – another to put together the artifact for release.
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- main
- develop
- feature/*
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
pdxUiProj: 'Priority.Dispatch.UI/Priority.Dispatch.UI.PDS.csproj'
pdxUiProjNuGetConfig: 'Priority.Dispatch.UI.PDS/NuGet.config'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 8'
inputs:
version: 8.0.x
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
# arguments: '--runtime win'
projects: '**/*.csproj'
feedsToUse: 'config'
nugetConfigPath: '$(pdxUiProjNuGetConfig)'
externalFeedCredentials: 'TelerikWithNuGetKey'
arguments: '-p:TargetFramework=net8.0'
- task: DotNetCoreCLI@2
displayName: 'dotnet build $(buildConfiguration)'
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'dotnet test $(buildConfiguration)'
inputs:
command: 'test'
projects: '**/*.csproj'
arguments: '--configuration $buildConfiguration) --collect "Code coverage"'
# Publish projects to specified folder.
- task: DotNetCoreCLI@2
displayName: 'Api dotnet publish $(buildConfiguration)'
inputs:
command: 'publish'
projects: 'Priority.Dispatch.Api/Priority.Dispatch.Api.csproj'
arguments: '-p:PublishProfile=FolderProfile --configuration $(buildConfiguration)'
zipAfterPublish: false
modifyOutputPath: true
- task: DotNetCoreCLI@2
displayName: 'Hub dotnet publish $(buildConfiguration)'
inputs:
command: 'publish'
projects: 'Priority.Dispatch.Hub/Priority.Dispatch.Hub.csproj'
arguments: '-p:PublishProfile=FolderProfile --configuration $(buildConfiguration)'
zipAfterPublish: false
modifyOutputPath: true
- task: DotNetCoreCLI@2
displayName: 'CXT integration dotnet publish $(buildConfiguration)'
inputs:
command: 'publish'
projects: 'Priority.Dispatch.System.CXTIntegrationApi/Priority.Dispatch.System.CXTIntegrationApi.csproj'
arguments: '-p:PublishProfile=FolderProfile --configuration $(buildConfiguration)'
zipAfterPublish: false
modifyOutputPath: true
- task: PublishPipelineArtifact@1
displayName: 'Api Publish Pipeline Artifact'
inputs:
targetPath: $(System.DefaultWorkingDirectory)/Priority.Dispatch.Api
artifactName: PDS Api
- task: PublishPipelineArtifact@1
displayName: 'Hub Publish Pipeline Artifact'
inputs:
targetPath: $(System.DefaultWorkingDirectory)/Priority.Dispatch.Hub/bin/Release/net8.0/win-x64/publish
artifactName: PDS Hub
- task: PublishPipelineArtifact@1
displayName: 'CXT Integration API Publish Pipeline Artifact'
inputs:
targetPath: $(System.DefaultWorkingDirectory)/Priority.Dispatch.System.CXTIntegrationApi
artifactName: Cxt Integration```
I don't get how adding a new task doing pretty much the same thing as we are doing for the previous two projects we wanted to include in this build would cause this to start showing that error on the pipelines page, and why would it parse okay, save and even run as expected - yet still show this message?
Thanks In Advance