Repository navigation
Expand file tree
/
Copy pathmaui-release.yml
More file actions
190 lines (168 loc) · 7.1 KB
/
Copy pathmaui-release.yml
File metadata and controls
190 lines (168 loc) · 7.1 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
182
183
184
185
186
187
188
189
190
trigger:
branches:
include:
- main
- release/*
tags:
include:
- '*'
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
variables:
- template: /eng/pipelines/common/variables.yml@self
- template: templates/common/vs-release-vars.yml@sdk-insertions
parameters:
- name: pushMauiPackagesToMaestro
default: true
- name: provisionatorChannel
displayName: 'Provisionator channel'
type: string
default: 'latest' # Support for launching a build against a Provisionator PR (e.g., pr/[github-account-name]/[pr-number]) as a means to test in-progress Provisionator changes
- name: VM_IMAGE_HOST
type: object
default:
name: MAUI-1ESPT
image: 1ESPT-Windows2022
os: windows
- name: PackPlatform
type: object
default:
name: Windows
artifact: nuget
binariesArtifact: pack-binaries
metadataArtifact: metadata
logsArtifact: logs
docsArtifact: xml-docs
- name: Skip1ESComplianceTasks
default: false
resources:
repositories:
- repository: yaml-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
ref: refs/heads/main
- repository: sdk-insertions
type: github
name: xamarin/sdk-insertions
ref: refs/heads/main
endpoint: xamarin
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool: ${{ parameters.VM_IMAGE_HOST }}
sdl:
${{ if eq('${{ parameters.Skip1ESComplianceTasks }}', 'true') }}:
enableAllTools: false
binskim:
scanOutputDirectoryOnly: true
codeql:
runSourceLanguagesInSourceAnalysis: true
policheck:
enabled: true
spotBugs:
enabled: false
justification: 'Failing with "Could not successfully find the java tool launcher"'
sourceRepositoriesToScan:
exclude:
- repository: yaml-templates
suppression:
suppressionFile: $(Build.SourcesDirectory)\eng\automation\guardian\source.gdnsuppress
stages:
- stage: pack_net
displayName: Pack .NET MAUI
dependsOn: []
jobs:
- job: pack_net_${{ parameters.PackPlatform.name }}
workspace:
clean: all
displayName: ${{ parameters.PackPlatform.name }}
timeoutInMinutes: 240
pool: ${{ parameters.VM_IMAGE_HOST }}
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish the ${{ parameters.PackPlatform.artifact }} artifacts'
artifactName: ${{ parameters.PackPlatform.artifact }}
targetPath: '$(Build.ArtifactStagingDirectory)/nuget'
- output: pipelineArtifact
displayName: 'Publish the ${{ parameters.PackPlatform.binariesArtifact }} artifacts'
artifactName: ${{ parameters.PackPlatform.binariesArtifact }}
targetPath: '$(System.DefaultWorkingDirectory)/artifacts/binaries'
- output: pipelineArtifact
displayName: 'Publish the ${{ parameters.PackPlatform.docsArtifact }} artifacts'
artifactName: ${{ parameters.PackPlatform.docsArtifact }}
targetPath: '$(System.DefaultWorkingDirectory)/artifacts/docs-packs'
- output: pipelineArtifact
displayName: 'Publish the ${{ parameters.PackPlatform.metadataArtifact }} artifacts'
artifactName: ${{ parameters.PackPlatform.metadataArtifact }}
targetPath: '$(Build.ArtifactStagingDirectory)/metadata'
- output: pipelineArtifact
displayName: 'Publish the ${{ parameters.PackPlatform.logsArtifact }} artifacts'
artifactName: ${{ parameters.PackPlatform.logsArtifact }}
targetPath: '$(Build.ArtifactStagingDirectory)/logs'
variables:
- name: _buildScript
value: $(Build.SourcesDirectory)/build.cmd -ci
- name: _BuildConfig
value: Release
steps:
- template: /eng/pipelines/common/pack.yml@self
parameters:
publishArtifacts: false
platform: ${{ parameters.PackPlatform.name }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
artifact: ${{ parameters.PackPlatform.artifact }}
artifactBinaries: ${{ parameters.PackPlatform.binariesArtifact }}
artifactsPath: '$(Build.ArtifactStagingDirectory)'
buildConfiguration: $(_BuildConfig)
dotnetScript: $(Build.SourcesDirectory)/dotnet.cmd
buildScript: $(_buildScript)
repoArtifactsPath: $(Build.Arcade.ArtifactsPath)
repoLogPath: $(Build.Arcade.LogsPath)
repoTestResultsPath: $(Build.Arcade.TestResultsPath)
prepareSteps:
- template: /eng/pipelines/common/provision.yml@self
parameters:
checkoutDirectory: '$(System.DefaultWorkingDirectory)'
provisionatorChannel: ${{ parameters.provisionatorChannel }}
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
skipAndroidImages: true
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: # Sign only using the private server
- template: /eng/pipelines/common/sign.yml@self
parameters:
dependsOn: ['pack_net']
stageName: 'nuget_signing'
poolName: ${{ parameters.VM_IMAGE_HOST.name }}
vmImage: ${{ parameters.VM_IMAGE_HOST.image }}
os: ${{ parameters.VM_IMAGE_HOST.os }}
- template: /eng/pipelines/common/insertion.yml@self # Insert on VS and SDK
parameters:
dependsOn: ['nuget_signing']
stageName: 'sdk_insertion'
poolName: ${{ parameters.VM_IMAGE_HOST.name }}
vmImage: ${{ parameters.VM_IMAGE_HOST.image }}
os: ${{ parameters.VM_IMAGE_HOST.os }}
pushMauiPackagesToMaestro: ${{ parameters.pushMauiPackagesToMaestro }}
- template: /eng/pipelines/common/apiscan.yml@self # ApiScan
parameters:
dependsOn: ['pack_net']
poolName: ${{ parameters.VM_IMAGE_HOST.name }}
vmImage: ${{ parameters.VM_IMAGE_HOST.image }}
os: ${{ parameters.VM_IMAGE_HOST.os }}
scanArtifacts: ['${{ parameters.PackPlatform.binariesArtifact }}']