This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
85 lines (71 loc) · 2.58 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
# 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:
- dev
variables:
buildConfiguration: 'Release'
BuildPlatform: 'x64'
Parameters.solution: '**\*.sln'
Parameters.serviceFabricProject: '**\*.sfproj'
jobs:
- job: WindowsBuild
displayName: 'Build for Windows'
pool:
vmImage: 'windows-latest'
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.4.1'
inputs:
versionSpec: 4.4.1
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
inputs:
solution: '$(Parameters.solution)'
msbuildArgs: '/p:Deterministic=true /p:PathMap=$(Agent.BuildDirectory)=C:\'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: VSBuild@1
displayName: 'Build solution **\*.sfproj'
inputs:
solution: '$(Parameters.serviceFabricProject)'
msbuildArgs: '/t:Package /p:PackageLocation=$(build.artifactstagingdirectory)\applicationpackage'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)\pdbs'
inputs:
SourceFolder: '$(build.artifactstagingdirectory)\applicationpackage'
Contents: '**\*.pdb'
TargetFolder: '$(build.artifactstagingdirectory)\pdbs'
- task: DeleteFiles@1
displayName: 'Delete files from $(build.artifactstagingdirectory)\applicationpackage'
inputs:
SourceFolder: '$(build.artifactstagingdirectory)\applicationpackage'
Contents: '**\*.pdb'
- task: ServiceFabricUpdateManifests@2
displayName: 'Update Service Fabric Manifests (Manifest versions)'
inputs:
applicationPackagePath: '$(build.artifactstagingdirectory)\applicationpackage'
versionSuffix: '.$(build.buildnumber)'
updateOnlyChanged: true
pkgArtifactName: drop
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)\projectartifacts'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: |
**\PublishProfiles\*.xml
**\ApplicationParameters\*.xml
TargetFolder: '$(build.artifactstagingdirectory)\projectartifacts'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()