Skip to content

Commit

Permalink
Updated Azure-pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankit Vijay committed Jun 26, 2020
1 parent d555d8e commit bb4e411
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
batch: true
branches:
include:
- master

pr:
autoCancel: true
branches:
include:
- master
pool:
vmImage: 'ubuntu-latest'

steps:
- task: GitVersion@5
displayName: GitVersion
inputs:
configFilePath: GitVersion.yml

- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '**/Enumeration.sln'
arguments: '--configuration $(BuildConfiguration)'

- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '**/*.Tests'
arguments: '--configuration $(BuildConfiguration) --no-build --collect:"XPlat Code Coverage" --settings $(Build.SourcesDirectory)/src/Coverlet.runsettings'

- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'

- task: DotNetCoreCLI@2
displayName: 'If master, Pack'
inputs:
command: pack
packagesToPack: '**/Enumeration.csproj;**/Enumeration.NewtonsoftJson.csproj;**/Enumeration.ModelBinder.csproj;**/Enumeration.SystemTextJson.csproj'
nobuild: true
versioningScheme: byBuildNumber
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))

- task: PublishPipelineArtifact@1
displayName: 'Publish Nuget Packages'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifact: 'Enumeration Packages'
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))

0 comments on commit bb4e411

Please sign in to comment.