-
Notifications
You must be signed in to change notification settings - Fork 77
/
azure-pipelines-official.yml
86 lines (84 loc) · 2.78 KB
/
azure-pipelines-official.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
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
variables:
LogDirectory: $(Build.ArtifactStagingDirectory)/logs
ArtifactsDirectory: artifacts
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
MSBuildArgs: '"/Property:Platform=$(BuildPlatform);Configuration=$(BuildConfiguration)" "/BinaryLogger:$(Build.SourcesDirectory)\$(ArtifactsDirectory)\msbuild.binlog"'
SignType: 'Real'
# Not using "--channel 10.0 --quality daily", see https://github.com/microsoft/slngen/issues/456
DotNet10InstallArgs: '-version 10.0.100-alpha.1.24571.14'
trigger:
batch: true
branches:
include:
- 'main'
- 'refs/tags/*'
paths:
exclude:
- '*.md'
pr: none
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
sdl:
sbom:
enabled: false
pool:
name: VSEngSS-MicroBuild2022-1ES
demands:
- msbuild
- visualstudio
os: windows
stages:
- stage: ''
displayName: 'Build'
jobs:
- job: Build
displayName: 'Build'
pool:
name: 'VSEngSS-MicroBuild2022-1ES'
templateContext:
mb:
signing:
enabled: true
signType: $(SignType)
zipSources: false
outputs:
- output: pipelineArtifact
displayName: 'Publish Artifacts'
condition: always()
targetPath: $(ArtifactsDirectory)
artifactName: 'artifacts'
steps:
- script: 'echo ##vso[task.setvariable variable=SignType;]Real'
displayName: 'Set SignType to Real for tagged commits'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
- task: UseDotNet@2
displayName: 'Install .NET 8.x'
inputs:
version: '8.x'
- task: UseDotNet@2
displayName: 'Install .NET 9.x'
inputs:
version: '9.x'
- script: |
powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) $(DotNet10InstallArgs) -InstallDir C:\ToolCache\dotnet"
dotnet --info
displayName: 'Install .NET 10.x'
- task: VSBuild@1
displayName: 'Build Solution'
inputs:
solution: '**\*.sln'
msbuildArgs: '$(MSBuildArgs)'
- task: PublishSymbols@2
displayName: 'Publish Symbols'
inputs:
SearchPattern: '**/bin/**/*.pdb'
IndexSources: false
SymbolServerType: TeamServices