-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
86 lines (74 loc) · 2.1 KB
/
azure-pipelines.yml
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
# D365Extensions build pipeline
variables:
semver: 2.1.0
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
# Build Number
name: $(semver)$(Rev:.r)
# Should trigger master, PR's or tags
trigger:
batch: true
branches:
include:
- master
# - refs/tags/*
pool:
vmImage: 'windows-latest'
steps:
- task: NuGetToolInstaller@0
displayName: Use NuGet 5.10.0
inputs:
versionSpec: '5.10.0'
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
restoreSolution: '$(solution)'
- task: DownloadSecureFile@1
displayName: Download secure file
inputs:
secureFile: ae991075-eb04-43de-afb0-c180d1f0e314
retryCount: 5
- task: CopyFiles@2
displayName: 'Copy FixRM.snk to: D365Extensions/D365Extensions'
inputs:
SourceFolder: $(Agent.TempDirectory)
Contents: FixRM.snk
TargetFolder: D365Extensions/D365Extensions
- task: CopyFiles@2
displayName: 'Copy FixRM.snk to: D365Extensions/D365Extensions.Tests'
inputs:
SourceFolder: $(Agent.TempDirectory)
Contents: FixRM.snk
TargetFolder: D365Extensions/D365Extensions.Tests
- task: VSBuild@1
displayName: Build solution **\*.sln
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: VsTest - testAssemblies
inputs:
testAssemblyVer2: |
**\$(BuildConfiguration)\*\*test*.dll
!**\*TestAdapter.dll
!**\obj\**
codeCoverageEnabled: true
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
diagnosticsEnabled: True
- task: NuGetCommand@2
displayName: NuGet pack
inputs:
command: pack
searchPatternPack: '**/*.csproj;!**\*.Tests.csproj;!**\*.Benchmark.csproj'
versioningScheme: byEnvVar
versionEnvVar: semver
condition: ne(variables['Build.Reason'], 'PullRequest')
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
TargetPath: '\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)'
condition: ne(variables['Build.Reason'], 'PullRequest')