-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild-services.yml
More file actions
89 lines (77 loc) · 2.86 KB
/
build-services.yml
File metadata and controls
89 lines (77 loc) · 2.86 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
parameters:
- name: repoToCheckout
type: string
- name: checkoutPath
type: string
- name: buildRelease
type: boolean
stages:
- stage: Build_Common
jobs:
- job: Build_Common
${{ if parameters.buildRelease }}:
strategy:
maxParallel: 2
matrix:
debug:
BuildConfiguration: debug
release:
BuildConfiguration: release
${{ else }}:
variables:
BuildConfiguration: 'debug'
steps:
- ${{ if ne(parameters.repoToCheckout, '') }}:
- checkout: ${{ parameters.repoToCheckout }}
path: ${{ parameters.checkoutPath }}
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: true
workingDirectory: 'Service\GroupMembershipManagement'
- task: DeleteFiles@1
displayName: "Clean up development local settings files"
inputs:
SourceFolder: 'Service\GroupMembershipManagement'
Contents: '**/local.settings.json'
- task: DotNetCoreCLI@2
displayName: dotnet build
retryCountOnTaskFailure: 3
inputs:
command: build
workingDirectory: 'Service\GroupMembershipManagement'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
retryCountOnTaskFailure: 3
inputs:
command: test
workingDirectory: 'Service\GroupMembershipManagement'
# see https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/Examples/MSBuild/MergeWith/HowTo.md for how to merge all the test output into one report
arguments: '--configuration $(BuildConfiguration) /p:CollectCoverage=true /p:MergeWith="$(Build.SourcesDirectory)/Coverage/coverage.json" /p:CoverletOutputFormat="cobertura" /p:CoverletOutput="$(Build.SourcesDirectory)/Coverage/" -m:1'
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'debug'))
- task: CopyFiles@2
displayName: 'copy arm templates'
inputs:
SourceFolder: Infrastructure
TargetFolder: '$(build.artifactstagingdirectory)/Infrastructure'
- task: CopyFiles@2
displayName: 'copy release management scripts'
inputs:
SourceFolder: Scripts
TargetFolder: '$(build.artifactstagingdirectory)/Scripts'
- task: PublishBuildArtifacts@1
displayName: 'publish artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: '$(Build.BuildNumber)_$(BuildConfiguration)'
- template: yaml/build-webapi.yml
parameters:
repoToCheckout: ${{ parameters.repoToCheckout }}
checkoutPath: ${{ parameters.checkoutPath }}
buildRelease: ${{ parameters.buildRelease }}
- template: yaml/build-webapp.yml
parameters:
repoToCheckout: ${{ parameters.repoToCheckout }}
checkoutPath: ${{ parameters.checkoutPath }}
buildRelease: ${{ parameters.buildRelease }}