-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipeline.yaml
74 lines (63 loc) · 1.96 KB
/
azure-pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# 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:
- master
- feature/*
- hotfix/*
- bug/*
pr:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
- name: buildConfiguration
value: 'Release'
- group: Antidrift-Build
steps:
- task: GitVersion@5
inputs:
runtime: 'core'
- task: replacetokens@3
inputs:
rootDirectory: 'src'
targetFiles: '**/*.runsettings'
encoding: 'auto'
writeBOM: true
actionOnMissing: 'warn'
keepToken: false
tokenPrefix: '#{'
tokenSuffix: '}#'
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
arguments: --configuration $(buildConfiguration) -p:Version=$(Build.BuildNumber)
command: build
workingDirectory: $(Build.SourcesDirectory)/src
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: 'test'
arguments: '--configuration $(buildConfiguration) -p:Version=$(Build.BuildNumber) --settings $(Build.SourcesDirectory)/src/build.runsettings --collect:"code coverage"'
workingDirectory: '$(Build.SourcesDirectory)/src'
#- task: BuildQualityChecks@6
# inputs:
# checkWarnings: true
# warningFailOption: 'build'
# warningFilters: '/\s([1-9]\d*\.?[0]*)\s+Warning\(s\)|\s([1-9]\d*\.?[0]*)\s+Error\(s\)/'
# showStatistics: true
# warningTaskFilters: '/^(((android|Xcode|gradlew|dotnet)\s+)?build|ant|maven|cmake|gulp)/i'
# displayName: 'Build quality check'
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
arguments: --configuration $(buildConfiguration) --output $(Build.ArtifactstagingDirectory) -r rhel.7.4-x64 -p:Version=$(Build.BuildNumber)
command: publish
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(Build.SourcesDirectory)/src/drift
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'drop'
targetPath: '$(Build.ArtifactstagingDirectory)'