-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
181 lines (162 loc) · 6.12 KB
/
azure-pipelines.yml
File metadata and controls
181 lines (162 loc) · 6.12 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# Prevent pull request triggers in the pipeline
pr: none
trigger:
branches:
include:
- 'main'
- 'release/*'
# global parameters are configured here and show up in AzDO UI in build queue time. Required for MSBuild and .NET.
# learn more at https://aka.ms/obpipelines/parameters
parameters:
- name: 'debug'
displayName: 'Enable debug output'
type: boolean
default: false
variables:
- name: BuildPlatform
value: 'any cpu'
- name: BuildConfiguration
value: 'release'
- name: DeploymentType
value: 'zipDeploy'
- name: WindowsContainerImage
value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
resources:
repositories:
- repository: onebranchTemplates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
extends:
template: v2/OneBranch.NonOfficial.CrossPlat.yml@onebranchTemplates
parameters:
customTags: 'ES365AIMigrationTooling'
globalSdl: # https://aka.ms/obpipelines/sdl
tsa:
enabled: false
stages:
- stage: Build
jobs:
- job: BuildCqrsSdk
displayName: Build CQRS SDK
pool:
type: windows
variables:
ob_outputDirectory: '$(Build.SourcesDirectory)\out' # this directory is uploaded to Pipeline artifacts, VSODrop, \\reddog, and Cloud Vault
steps:
- task: NuGetToolInstaller@1
displayName: Install NuGet 5.5.1
inputs:
versionSpec: '5.5.1'
checkLatest: true
- task: UseDotNet@2
displayName: Use .NET Core 6.0.x
inputs:
packageType: 'sdk'
version: '6.0.x'
- task: DotNetCoreCLI@2
displayName: 'DotNetCore restore'
inputs:
command: 'restore'
projects: 'src/CQRS.Mediatr.Lite.sln'
feedsToUse: 'select'
vstsFeed: '3d1a556d-2042-4a45-9dae-61808ff33d3b/18496829-a46f-4605-8121-1fd072c0dfd1'
includeNuGetOrg: false
- task: DotNetCoreCLI@2
displayName: Build Library Projects
inputs:
command: 'build'
projects: 'src/sdk/CQRS.Mediatr.Lite.SDK.csproj'
- task: DotNetCoreCLI@2
displayName: Test Projects
inputs:
command: 'test'
projects: 'src/tests/*.Tests.csproj'
- task: DotNetCoreCLI@2
displayName: Publish Library Projects
inputs:
command: publish
publishWebProjects: false
projects: 'src/sdk/CQRS.Mediatr.Lite.SDK.csproj'
arguments: --output $(Build.SourcesDirectory)/PublishedFolder/Library --configuration $(BuildConfiguration)
zipAfterPublish: false
- task: onebranch.pipeline.signing@1
inputs:
command: 'sign'
signing_profile: 'internal_azure_service'
files_to_sign: '**/*.exe;**/*.dll;**/*.ps1'
search_root: '$(Build.SourcesDirectory)/PublishedFolder'
- task: ArchiveFiles@2
displayName: 'Archive Library Projects'
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)/PublishedFolder/Library'
includeRootFolder: false
archiveType: 'zip'
archiveFile: 'API.zip'
replaceExistingArchive: true
- task: CopyFiles@2
displayName: "Copy Files for 'Publish Artifact' publish task"
condition: succeededOrFailed()
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: '**/*.zip'
TargetFolder: $(Build.ArtifactStagingDirectory)/drop/
- job: BuildSample
displayName: Build Sample
pool:
type: windows
variables:
ob_outputDirectory: '$(Build.SourcesDirectory)\out' # this directory is uploaded to Pipeline artifacts, VSODrop, \\reddog, and Cloud Vault
steps:
- task: NuGetToolInstaller@1
displayName: Install NuGet 5.5.1
inputs:
versionSpec: '5.5.1'
checkLatest: true
- task: UseDotNet@2
displayName: Use .NET Core 6.0.x
inputs:
packageType: 'sdk'
version: '6.0.x'
- task: DotNetCoreCLI@2
displayName: 'DotNetCore restore'
inputs:
command: 'restore'
projects: 'samples/CQRS.Mediatr.Lite.Samples/CQRS.Mediatr.Lite.Samples.sln'
feedsToUse: 'select'
vstsFeed: '3d1a556d-2042-4a45-9dae-61808ff33d3b/18496829-a46f-4605-8121-1fd072c0dfd1'
includeNuGetOrg: false
- task: DotNetCoreCLI@2
displayName: Build SampleAPI Project
inputs:
command: 'build'
projects: 'samples/CQRS.Mediatr.Lite.Samples/CQRS.Mediatr.Lite.Samples.NetCoreApi/CQRS.Mediatr.Lite.Samples.NetCoreApi.csproj'
- task: DotNetCoreCLI@2
displayName: Publish SampleAPI Project
inputs:
command: publish
publishWebProjects: false
projects: 'samples/CQRS.Mediatr.Lite.Samples/CQRS.Mediatr.Lite.Samples.NetCoreApi/CQRS.Mediatr.Lite.Samples.NetCoreApi.csproj'
arguments: --output $(Build.SourcesDirectory)/PublishedFolder/SampleAPI --configuration $(BuildConfiguration)
zipAfterPublish: false
- task: onebranch.pipeline.signing@1
inputs:
command: 'sign'
signing_profile: 'internal_azure_service'
files_to_sign: '**/*.exe;**/*.dll;**/*.ps1'
search_root: '$(Build.SourcesDirectory)/PublishedFolder'
- task: ArchiveFiles@2
displayName: 'Archive SampleAPI Project'
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)/PublishedFolder/SampleAPI'
includeRootFolder: false
archiveType: 'zip'
archiveFile: 'API.zip'
replaceExistingArchive: true
- task: CopyFiles@2
displayName: "Copy Files for 'Publish Artifact' publish task"
condition: succeededOrFailed()
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: '**/*.zip'
TargetFolder: $(Build.ArtifactStagingDirectory)/drop/