Skip to content

Commit 1329d1a

Browse files
author
Jason Zhai
committed
[release/7.0.4xx] Add -pr version of pipeline
1 parent 969c205 commit 1329d1a

File tree

1 file changed

+207
-0
lines changed

1 file changed

+207
-0
lines changed

.vsts-pr.yml

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

0 commit comments

Comments
 (0)