forked from dotnet/roslyn-analyzers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-microbuild.yml
119 lines (114 loc) · 3.62 KB
/
azure-pipelines-microbuild.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
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
parameters:
# Optionally do not publish to TSA. Useful for e.g. verifying fixes before PR.
- name: TSAEnabled
displayName: Publish results to TSA
type: boolean
default: true
# Branches that trigger a build on commit
trigger:
- main
- release/*
- features/*
- 2.9.x
variables:
- name: _TeamName
value: Roslyn
- group: DotNet-Roslyn-SDLValidation-Params
- group: DotNet-Symbol-Server-Pats
- group: DotNet-Versions-Publish
- group: ManagedLanguageSecrets
stages:
- stage: build
displayName: Build
jobs:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/8.0.1xx') }}:
- template: /eng/common/templates/job/onelocbuild.yml
parameters:
MirrorRepo: roslyn-analyzers
MirrorBranch: release/8.0.1xx
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-ROSANLZR'
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishTestResults: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
enableTelemetry: true
enableSourceBuild: true
jobs:
- job: Signed_Build
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2022preview.amd64
variables:
- group: Publish-Build-Assets
- name: _BuildConfig
value: Release
- name: _SignType
value: real
steps:
- checkout: self
clean: true
- script: eng\common\CIBuild.cmd
-configuration $(_BuildConfig)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:DotNetSignType=$(_SignType)
/p:DotnetPublishUsingPipelines=true
displayName: Build and Test
# Archive NuGet packages to DevOps.
- task: PublishBuildArtifacts@1
displayName: Publish Artifact Packages
inputs:
PathtoPublish: 'artifacts\packages\$(_BuildConfig)'
ArtifactName: 'Packages'
condition: succeeded()
# Archive VSIX packages to DevOps.
- task: PublishBuildArtifacts@1
displayName: Publish Artifact VSIXes
inputs:
PathtoPublish: 'artifacts\VSSetup\$(_BuildConfig)'
ArtifactName: 'VSIXes'
condition: succeeded()
- stage: analysis
displayName: Code analysis
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2022preview.amd64
jobs:
- job: codeql
displayName: CodeQL
timeoutInMinutes: 120
variables:
# CG is handled in the primary CI pipeline
- name: skipComponentGovernanceDetection
value: true
# Force CodeQL enabled so it may be run on any branch
- name: Codeql.Enabled
value: true
# Do not let CodeQL 3000 Extension gate scan frequency
- name: Codeql.Cadence
value: 0
- name: Codeql.TSAEnabled
value: true
steps:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- task: CodeQL3000Init@0
displayName: CodeQL Initialize
- script: eng\common\cibuild.cmd
-configuration Release
-prepareMachine
/p:Test=false
displayName: Windows Build
- task: CodeQL3000Finalize@0
displayName: CodeQL Finalize
- template: eng\common\templates\post-build\post-build.yml
parameters:
publishingInfraVersion: 3
enableSymbolValidation: false
enableSigningValidation: false
enableSourceLinkValidation: false
enableNugetValidation: false