Skip to content

Commit

Permalink
Merge pull request Kros-sk#15 from Kros-sk/SlowPipelineFix
Browse files Browse the repository at this point in the history
Usees explicit task for publishing test results. Fixes slow runs of pipelines, because of some bug in [DotNetCoreCLI@2](microsoft/azure-pipelines-tasks#11831) task.
  • Loading branch information
satano authored Nov 26, 2019
2 parents de6e67a + deab436 commit 0f4d79b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 33 deletions.
25 changes: 9 additions & 16 deletions build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,22 @@ trigger:
pool:
name: Default

resources:
repositories:
- repository: templates
type: git
name: DevShared/Templates

variables:
- group: Nuget
- name: buildConfiguration
value: 'Release'
- name: projectName
value: 'Kros.KORM.Extensions.Asp'

steps:
- task: DotNetCoreCLI@2
displayName: 'Nuget restore'
inputs:
command: 'restore'
projects: '**/$(projectName).csproj'

- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: build
projects: '**/$(projectName).csproj'
arguments: '--configuration $(BuildConfiguration) --no-restore'
projects: '**/*.csproj'
arguments: '--configuration $(BuildConfiguration)'

- task: DotNetCoreCLI@2
displayName: 'Tests'
inputs:
command: test
projects: '**/*Tests*.csproj'
- template: steps/dotnet-test-and-publish-results.yml@templates
21 changes: 4 additions & 17 deletions build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,25 @@ resources:
name: DevShared/Templates

variables:
- group: Nuget
- name: buildConfiguration
value: 'Release'
- name: projectName
value: 'Kros.KORM.Extensions.Asp'

steps:
- template: steps/delete-nupkgs.yml@templates

- task: DotNetCoreCLI@2
displayName: 'Nuget restore'
inputs:
command: 'restore'
projects: '**/$(projectName).csproj'

- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: build
projects: '**/$(projectName).csproj'
arguments: '--configuration $(BuildConfiguration) --no-restore'
projects: '**/*.csproj'
arguments: '--configuration $(BuildConfiguration)'

- task: DotNetCoreCLI@2
displayName: 'Tests'
inputs:
command: test
projects: '**/*Tests*.csproj'
- template: steps/dotnet-test-and-publish-results.yml@templates

- task: CopyFiles@2
displayName: 'Copy package files to staging directory'
inputs:
Contents: '**/$(projectName)*.nupkg'
Contents: '**/*.nupkg'
TargetFolder: '$(build.artifactStagingDirectory)'
FlattenFolders: true

Expand Down

0 comments on commit 0f4d79b

Please sign in to comment.