Skip to content

Commit 963d34b

Browse files
authored
Simplify pipelines (#2376)
1 parent c96672b commit 963d34b

File tree

2 files changed

+17
-64
lines changed

2 files changed

+17
-64
lines changed

.vsts-ci-official.yml

+10-21
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,10 @@ extends:
5353
jobs:
5454
- job: Windows
5555
pool:
56-
# For public or PR jobs, use the hosted pool. For internal jobs use the internal pool.
57-
# Will eventually change this to two BYOC pools.
58-
${{ if ne(variables['System.TeamProject'], 'internal') }}:
59-
name: NetCore-Public
60-
demands: ImageOverride -equals windows.vs2022.amd64.open
61-
${{ if eq(variables['System.TeamProject'], 'internal') }}:
62-
name: NetCore1ESPool-Internal
63-
demands: ImageOverride -equals windows.vs2022.amd64
56+
name: NetCore1ESPool-Internal
57+
demands: ImageOverride -equals windows.vs2022.amd64
6458
variables:
65-
# Only enable publishing in official builds.
66-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
59+
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
6760
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
6861
- group: DotNet-Symbol-Server-Pats
6962
- group: Publish-Build-Assets
@@ -79,7 +72,7 @@ extends:
7972
- name: _PublishUsingPipelines
8073
value: true
8174
# else
82-
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
75+
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
8376
- name: _OfficialBuildArgs
8477
value: ''
8578
strategy:
@@ -92,10 +85,10 @@ extends:
9285

9386
Release:
9487
_BuildConfig: Release
95-
# PRs or external builds are not signed.
96-
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
88+
# PRs are not signed.
89+
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
9790
_SignType: test
98-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
91+
${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
9992
_SignType: real
10093
_BuildArgs: $(_OfficialBuildArgs)
10194

@@ -124,12 +117,8 @@ extends:
124117
- job: Ubuntu
125118
displayName: Ubuntu
126119
pool:
127-
${{ if eq(variables['System.TeamProject'], 'public') }}:
128-
name: NetCore-Svc-Public
129-
demands: ImageOverride -equals 1es-ubuntu-2004-open
130-
${{ if eq(variables['System.TeamProject'], 'internal') }}:
131-
name: NetCore1ESPool-Svc-Internal
132-
demands: ImageOverride -equals 1es-ubuntu-2004
120+
name: NetCore1ESPool-Svc-Internal
121+
demands: ImageOverride -equals 1es-ubuntu-2004
133122
os: linux
134123
strategy:
135124
matrix:
@@ -179,5 +168,5 @@ extends:
179168
--prepareMachine
180169
displayName: Build
181170

182-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
171+
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
183172
- template: /eng/common/templates-official/post-build/post-build.yml@self

.vsts-ci.yml

+7-43
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,11 @@ stages:
3737
jobs:
3838
- job: Windows
3939
pool:
40-
# For public or PR jobs, use the hosted pool. For internal jobs use the internal pool.
41-
# Will eventually change this to two BYOC pools.
42-
${{ if ne(variables['System.TeamProject'], 'internal') }}:
43-
name: NetCore-Public
44-
demands: ImageOverride -equals windows.vs2022.amd64.open
45-
${{ if eq(variables['System.TeamProject'], 'internal') }}:
46-
name: NetCore1ESPool-Internal
47-
demands: ImageOverride -equals windows.vs2022.amd64
40+
name: NetCore-Public
41+
demands: ImageOverride -equals windows.vs2022.amd64.open
4842
variables:
49-
# Only enable publishing in official builds.
50-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
51-
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
52-
- group: DotNet-Symbol-Server-Pats
53-
- group: Publish-Build-Assets
54-
- name: _OfficialBuildArgs
55-
value: /p:DotNetSignType=$(_SignType)
56-
/p:TeamName=$(_TeamName)
57-
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
58-
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
59-
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
60-
/p:PublishToSymbolServer=true
61-
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
62-
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
63-
- name: _PublishUsingPipelines
64-
value: true
65-
# else
66-
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
67-
- name: _OfficialBuildArgs
68-
value: ''
43+
- name: _OfficialBuildArgs
44+
value: ''
6945
strategy:
7046
matrix:
7147
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
@@ -76,12 +52,7 @@ stages:
7652

7753
Release:
7854
_BuildConfig: Release
79-
# PRs or external builds are not signed.
80-
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
81-
_SignType: test
82-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
83-
_SignType: real
84-
_BuildArgs: $(_OfficialBuildArgs)
55+
_SignType: test
8556
steps:
8657
- checkout: self
8758
clean: true
@@ -108,12 +79,8 @@ stages:
10879
- job: Ubuntu
10980
displayName: Ubuntu
11081
pool:
111-
${{ if eq(variables['System.TeamProject'], 'public') }}:
112-
name: NetCore-Svc-Public
113-
demands: ImageOverride -equals 1es-ubuntu-2004-open
114-
${{ if eq(variables['System.TeamProject'], 'internal') }}:
115-
name: NetCore1ESPool-Svc-Internal
116-
demands: ImageOverride -equals 1es-ubuntu-2004
82+
name: NetCore-Svc-Public
83+
demands: ImageOverride -equals 1es-ubuntu-2004-open
11784
strategy:
11885
matrix:
11986
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
@@ -159,6 +126,3 @@ stages:
159126
--configuration $(_BuildConfig)
160127
--prepareMachine
161128
displayName: Build
162-
163-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
164-
- template: eng\common\templates\post-build\post-build.yml

0 commit comments

Comments
 (0)