Skip to content

Commit d057164

Browse files
authored
[release/8.0.1xx] Add -pr version of pipeline (#39388)
2 parents 979dcb8 + d360f0b commit d057164

File tree

1 file changed

+211
-0
lines changed

1 file changed

+211
-0
lines changed

.vsts-pr.yml

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
trigger:
2+
batch: true
3+
branches:
4+
include:
5+
- main
6+
- release/8.0.1xx
7+
- internal/release/*
8+
- exp/*
9+
10+
pr:
11+
branches:
12+
include:
13+
- main
14+
- release/*
15+
- internal/release/*
16+
17+
18+
variables:
19+
- name: teamName
20+
value: Roslyn-Project-System
21+
- name: _DotNetPublishToBlobFeed
22+
value: false
23+
- name: _CIBuild
24+
value: -restore -build -sign -pack -ci
25+
- name: _DotNetArtifactsCategory
26+
value: .NETCore
27+
- name: _DotNetValidationArtifactsCategory
28+
value: .NETCore
29+
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
30+
- name: PostBuildSign
31+
value: false
32+
- ${{ else }}:
33+
- name: PostBuildSign
34+
value: true
35+
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
36+
- name: _InternalRuntimeDownloadArgs
37+
value: ''
38+
- name: _OfficialBuildArgs
39+
value: ''
40+
- name: "skipComponentGovernanceDetection"
41+
value: "true"
42+
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
43+
- name: _OfficialBuildArgs
44+
value: /p:OfficialBuilder=Microsoft
45+
- name: Codeql.Enabled
46+
value: true
47+
- group: DotNetBuilds storage account read tokens
48+
- name: _InternalRuntimeDownloadArgs
49+
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
50+
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
51+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
52+
- group: DotNet-CLI-SDLValidation-Params
53+
- template: /eng/common/templates/variables/pool-providers.yml
54+
55+
stages:
56+
- stage: build
57+
displayName: Build
58+
jobs:
59+
- job: Publish_Build_Configuration
60+
pool:
61+
${{ if eq(variables['System.TeamProject'], 'public') }}:
62+
vmImage: 'windows-2019'
63+
${{ if eq(variables['System.TeamProject'], 'internal') }}:
64+
name: $(DncEngInternalBuildPool)
65+
demands: ImageOverride -equals windows.vs2019.amd64
66+
steps:
67+
- publish: $(Build.SourcesDirectory)\eng\BuildConfiguration
68+
artifact: BuildConfiguration
69+
displayName: Publish Build Config
70+
- template: /eng/build.yml
71+
parameters:
72+
agentOs: Windows_NT
73+
pool:
74+
${{ if eq(variables['System.TeamProject'], 'public') }}:
75+
name: $(DncEngPublicBuildPool)
76+
demands: ImageOverride -equals 1es-windows-2022-open
77+
${{ if ne(variables['System.TeamProject'], 'public') }}:
78+
name: $(DncEngInternalBuildPool)
79+
demands: ImageOverride -equals 1es-windows-2022
80+
${{ if eq(variables['System.TeamProject'], 'public') }}:
81+
helixTargetQueue: Windows.Amd64.VS2022.Pre.Open
82+
${{ if ne(variables['System.TeamProject'], 'public') }}:
83+
helixTargetQueue: Windows.Amd64.VS2022.Pre
84+
strategy:
85+
matrix:
86+
Build_Release:
87+
_BuildConfig: Release
88+
_PublishArgs: '-publish /p:DotNetPublishUsingPipelines=true'
89+
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
90+
_SignType: test
91+
_Test: -test
92+
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
93+
_SignType: real
94+
_Test: ''
95+
- template: /eng/common/templates/job/source-build.yml
96+
parameters:
97+
platform:
98+
name: 'Managed'
99+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8'
100+
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
101+
- template: /eng/build.yml
102+
parameters:
103+
agentOs: Windows_NT_FullFramework
104+
pool:
105+
${{ if eq(variables['System.TeamProject'], 'public') }}:
106+
name: $(DncEngPublicBuildPool)
107+
demands: ImageOverride -equals 1es-windows-2022-open
108+
${{ if ne(variables['System.TeamProject'], 'public') }}:
109+
name: $(DncEngInternalBuildPool)
110+
demands: ImageOverride -equals windows.vs2022preview.amd64
111+
${{ if eq(variables['System.TeamProject'], 'public') }}:
112+
helixTargetQueue: Windows.Amd64.VS2022.Pre.Open
113+
${{ if ne(variables['System.TeamProject'], 'public') }}:
114+
helixTargetQueue: Windows.Amd64.VS2022.Pre
115+
strategy:
116+
matrix:
117+
Build_Debug:
118+
_BuildConfig: Debug
119+
_PublishArgs: ''
120+
_SignType: test
121+
_Test: -test
122+
123+
- template: /eng/build.yml
124+
parameters:
125+
agentOs: Windows_NT_TestAsTools
126+
pool:
127+
${{ if eq(variables['System.TeamProject'], 'public') }}:
128+
vmImage: 'windows-2019'
129+
${{ if ne(variables['System.TeamProject'], 'public') }}:
130+
name: $(DncEngInternalBuildPool)
131+
demands: ImageOverride -equals windows.vs2019.amd64
132+
strategy:
133+
matrix:
134+
Build_Debug:
135+
_BuildConfig: Debug
136+
_PublishArgs: ''
137+
_SignType: test
138+
139+
- template: /eng/build.yml
140+
parameters:
141+
agentOs: Ubuntu_22_04
142+
pool:
143+
${{ if eq(variables['System.TeamProject'], 'public') }}:
144+
vmImage: 'ubuntu-22.04'
145+
${{ if ne(variables['System.TeamProject'], 'public') }}:
146+
name: $(DncEngInternalBuildPool)
147+
demands: ImageOverride -equals build.ubuntu.2204.amd64
148+
${{ if eq(variables['System.TeamProject'], 'public') }}:
149+
helixTargetQueue: ubuntu.2204.amd64.open
150+
${{ if ne(variables['System.TeamProject'], 'public') }}:
151+
helixTargetQueue: Ubuntu.2204.Amd64
152+
strategy:
153+
matrix:
154+
Build_Release:
155+
_BuildConfig: Release
156+
_PublishArgs: ''
157+
_SignType: test
158+
_Test: -test
159+
160+
- template: /eng/build.yml
161+
parameters:
162+
agentOs: Darwin
163+
pool:
164+
vmImage: 'macOS-latest'
165+
${{ if eq(variables['System.TeamProject'], 'public') }}:
166+
helixTargetQueue: OSX.13.Amd64.Open
167+
${{ if ne(variables['System.TeamProject'], 'public') }}:
168+
helixTargetQueue: OSX.13.Amd64
169+
strategy:
170+
matrix:
171+
Build_Release:
172+
_BuildConfig: Release
173+
_PublishArgs: ''
174+
_SignType: test
175+
_Test: -test
176+
177+
- template: /eng/template-engine.yml
178+
179+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
180+
- template: /eng/common/templates/job/publish-build-assets.yml
181+
parameters:
182+
publishUsingPipelines: true
183+
publishAssetsImmediately: true
184+
dependsOn:
185+
- Windows_NT
186+
- Source_Build_Managed
187+
pool:
188+
name: $(DncEngInternalBuildPool)
189+
demands: ImageOverride -equals windows.vs2019.amd64
190+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
191+
- template: /eng/common/templates/post-build/post-build.yml
192+
parameters:
193+
publishingInfraVersion: 3
194+
enableSymbolValidation: false
195+
enableSigningValidation: false
196+
enableNugetValidation: false
197+
enableSourceLinkValidation: false
198+
publishInstallersAndChecksums: true
199+
publishAssetsImmediately: true
200+
SDLValidationParameters:
201+
enable: false
202+
params: ' -SourceToolsList @("policheck","credscan")
203+
-TsaInstanceURL $(_TsaInstanceURL)
204+
-TsaProjectName $(_TsaProjectName)
205+
-TsaNotificationEmail $(_TsaNotificationEmail)
206+
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
207+
-TsaBugAreaPath $(_TsaBugAreaPath)
208+
-TsaIterationPath $(_TsaIterationPath)
209+
-TsaRepositoryName "dotnet-sdk"
210+
-TsaCodebaseName "dotnet-sdk"
211+
-TsaPublish $True'

0 commit comments

Comments
 (0)