Same project and project name is ‘aus’ and has repo webstore-security.
with same configuration. SOnar cloud prepare , build and publish tasks successfully executed and reports got generated
and where as in another pipeline with in same repo and same project, and with same configuration it failed some error. Please suggest
Worked pipeline logs:
Worked YAML file:
trigger:
- none
pool:
vmImage: ubuntu-latest
variables:
buildConfiguration: 'Release'
stages:
- stage: 'BuildStage'
displayName: 'Build Stage'
jobs:
- job: BuildAndPublish
displayName: 'Build and Publish'
steps:
- checkout: self
fetchDepth: 0
- task: UseDotNet@2
displayName: 'Use .NET 6'
inputs:
version: '6.x'
- task: DotNetCoreCLI@2
displayName: '.NET Restore'
inputs:
command: 'restore'
projects: '**/*.csproj'
feedsToUse: 'select'
- task: SonarCloudPrepare@2
inputs:
SonarCloud: 'SonarCLoud'
organization: 'nextops123'
scannerMode: 'MSBuild'
projectKey: 'nextops123_webstore-security'
projectName: 'webstore-security'
- task: DotNetCoreCLI@2
displayName: '.NET Build'
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: '.NET Publish'
inputs:
command: 'publish'
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
- task: SonarCloudAnalyze@2
inputs:
jdkversion: 'JAVA_HOME_17_X64'
- task: SonarCloudPublish@2
inputs:
pollingTimeoutSec: '300'
- task: PublishPipelineArtifact@1
displayName: 'Publish Artifact'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifact: 'ausemart-web'
publishLocation: 'pipeline'
worked pipeline name: webstore-sec-sonar-ci
Failed pipeline logs:
YAML file of failed pipeline:
trigger:
- none
pool:
vmImage: ‘ubuntu-latest’
variables:
mend: true
parameters:
- name: MendScan
type: string
default: false
jobs: - job: BuildAndPublish
displayName: ‘Build and Publish’
steps:- checkout: self
fetchDepth: 0 - task: UseDotNet@2
displayName: ‘Use .NET 6’
inputs:
version: ‘6.x’ - task: DotNetCoreCLI@2
displayName: ‘.NET Restore’
inputs:
command: ‘restore’
projects: ‘**/*.csproj’
feedsToUse: ‘select’ - task: DotNetCoreCLI@2
displayName: ‘.NET Build’
inputs:
command: ‘build’
projects: ‘**/*.csproj’
arguments: ‘–configuration Release’ - template: templates/sonarcloudprepare.yaml
- template: templates/sonarcloudbuildPublish.yaml
- task: DotNetCoreCLI@2
displayName: ‘.NET Publish’
inputs:
command: ‘publish’
projects: ‘**/*.csproj’
arguments: ‘–configuration Release --output $(Build.ArtifactStagingDirectory)’
- checkout: self
- task: WhiteSource@21
inputs:
cwd: ‘$(System.DefaultWorkingDirectory)’
projectName: ‘webstore’
- template: templates/mendbolt.yaml
- task: PublishPipelineArtifact@1
inputs:
targetPath: ‘$(Build.ArtifactStagingDirectory)’
artifact: ‘webstore’
publishLocation: ‘pipeline’
faield pipeline name : Basic-Dotnet-Build
Please suggest. What Could be missing?