-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ankit Vijay
committed
Jun 26, 2020
1 parent
d555d8e
commit bb4e411
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')) | ||
|