11variables :
22 - name : _TeamName
33 value : DotNetCore
4+ - name : _DotNetArtifactsCategory
5+ value : .NETCore
46
57# CI and PR triggers
68trigger :
@@ -15,134 +17,147 @@ pr:
1517 include :
1618 - ' *'
1719
18- jobs :
19- - template : /eng/common/templates/jobs/jobs.yml
20- parameters :
21- enableMicrobuild : true
22- enablePublishBuildArtifacts : true
23- enablePublishTestResults : true
24- enablePublishBuildAssets : true
25- enableTelemetry : true
26- helixRepo : dotnet/command-line-api
27- timeoutInMinutes : 180 # increase timeout since BAR publishing might wait a long time
28- jobs :
29- - job : Windows
30- pool :
31- # For public or PR jobs, use the hosted pool. For internal jobs use the internal pool.
32- # Will eventually change this to two BYOC pools.
33- ${{ if ne(variables['System.TeamProject'], 'internal') }} :
34- name : NetCorePublic-Pool
35- queue : BuildPool.Windows.10.Amd64.VS2019.Open
36- ${{ if eq(variables['System.TeamProject'], 'internal') }} :
37- name : NetCoreInternal-Pool
38- queue : BuildPool.Windows.10.Amd64.VS2019
39- variables :
40- # Only enable publishing in official builds.
41- - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
42- # DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
43- # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
44- - group : DotNet-Blob-Feed
45- - group : DotNet-Symbol-Server-Pats
46- - group : Publish-Build-Assets
47- - name : _OfficialBuildArgs
48- value : /p:DotNetSignType=$(_SignType)
49- /p:TeamName=$(_TeamName)
50- /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
51- /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
52- /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
53- /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
54- /p:PublishToSymbolServer=true
55- /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
56- /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
57- # else
58- - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
59- - name : _OfficialBuildArgs
60- value : ' '
61- strategy :
62- matrix :
63- ${{ if in(variables['Build.Reason'], 'PullRequest') }} :
64- Debug :
65- _BuildConfig : Debug
66- _SignType : test
67- _DotNetPublishToBlobFeed : false
68- _BuildArgs :
20+ stages :
21+ - stage : build
22+ displayName : Build and Test
23+ jobs :
24+ - template : /eng/common/templates/jobs/jobs.yml
25+ parameters :
26+ enableMicrobuild : true
27+ enablePublishBuildArtifacts : true
28+ enablePublishUsingPipelines : true
29+ enablePublishTestResults : true
30+ enablePublishBuildAssets : true
31+ enableTelemetry : true
32+ helixRepo : dotnet/command-line-api
33+ timeoutInMinutes : 180 # increase timeout since BAR publishing might wait a long time
34+ jobs :
35+ - job : Windows
36+ pool :
37+ # For public or PR jobs, use the hosted pool. For internal jobs use the internal pool.
38+ # Will eventually change this to two BYOC pools.
39+ ${{ if ne(variables['System.TeamProject'], 'internal') }} :
40+ name : NetCorePublic-Pool
41+ queue : BuildPool.Windows.10.Amd64.VS2019.Open
42+ ${{ if eq(variables['System.TeamProject'], 'internal') }} :
43+ name : NetCoreInternal-Pool
44+ queue : BuildPool.Windows.10.Amd64.VS2019
45+ variables :
46+ # Only enable publishing in official builds.
47+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
48+ # DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
49+ # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
50+ - group : DotNet-Blob-Feed
51+ - group : DotNet-Symbol-Server-Pats
52+ - group : Publish-Build-Assets
53+ - name : _OfficialBuildArgs
54+ value : /p:DotNetSignType=$(_SignType)
55+ /p:TeamName=$(_TeamName)
56+ /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
57+ /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
58+ /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
59+ /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
60+ /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
61+ /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
62+ /p:PublishToSymbolServer=true
63+ /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
64+ /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
65+ - name : _PublishUsingPipelines
66+ value : true
67+ # else
68+ - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
69+ - name : _OfficialBuildArgs
70+ value : ' '
71+ strategy :
72+ matrix :
73+ ${{ if in(variables['Build.Reason'], 'PullRequest') }} :
74+ Debug :
75+ _BuildConfig : Debug
76+ _SignType : test
77+ _DotNetPublishToBlobFeed : false
78+ _BuildArgs :
6979
70- Release :
71- _BuildConfig : Release
72- # PRs or external builds are not signed.
73- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
74- _SignType : test
75- _DotNetPublishToBlobFeed : false
76- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
77- _SignType : real
78- _DotNetPublishToBlobFeed : true
79- _BuildArgs : $(_OfficialBuildArgs)
80- steps :
81- - checkout : self
82- clean : true
83- - script : eng\common\cibuild.cmd
84- -configuration $(_BuildConfig)
85- -prepareMachine
86- $(_BuildArgs)
87- displayName : Build and Publish
88- - task : PublishBuildArtifacts@1
89- displayName : Upload package artifacts
90- condition : and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
91- inputs :
92- pathtoPublish : artifacts/packages/
93- artifactName : artifacts
94- artifactType : Container
95- parallel : true
96- - task : PublishBuildArtifacts@1
97- displayName : Publish Artifact Symbols
98- condition : and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
99- inputs :
100- PathtoPublish : ' $(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)'
101- ArtifactName : ' NativeSymbols'
80+ Release :
81+ _BuildConfig : Release
82+ # PRs or external builds are not signed.
83+ ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
84+ _SignType : test
85+ _DotNetPublishToBlobFeed : false
86+ ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
87+ _SignType : real
88+ _DotNetPublishToBlobFeed : true
89+ _BuildArgs : $(_OfficialBuildArgs)
90+ steps :
91+ - checkout : self
92+ clean : true
93+ - script : eng\common\cibuild.cmd
94+ -configuration $(_BuildConfig)
95+ -prepareMachine
96+ $(_BuildArgs)
97+ displayName : Build and Publish
98+ - task : PublishBuildArtifacts@1
99+ displayName : Upload package artifacts
100+ condition : and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
101+ inputs :
102+ pathtoPublish : artifacts/packages/
103+ artifactName : artifacts
104+ artifactType : Container
105+ parallel : true
106+ - task : PublishBuildArtifacts@1
107+ displayName : Publish Artifact Symbols
108+ condition : and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
109+ inputs :
110+ PathtoPublish : ' $(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)'
111+ ArtifactName : ' NativeSymbols'
102112
103- - job : Ubuntu_16_04
104- displayName : ' Ubuntu 16.04'
105- pool :
106- name : Hosted Ubuntu 1604
107- strategy :
108- matrix :
109- ${{ if in(variables['Build.Reason'], 'PullRequest') }} :
110- Debug :
111- _BuildConfig : Debug
113+ - job : Ubuntu_16_04
114+ displayName : ' Ubuntu 16.04'
115+ pool :
116+ name : Hosted Ubuntu 1604
117+ strategy :
118+ matrix :
119+ ${{ if in(variables['Build.Reason'], 'PullRequest') }} :
120+ Debug :
121+ _BuildConfig : Debug
122+ _SignType : none
123+ _DotNetPublishToBlobFeed : false
124+ Release :
125+ _BuildConfig : Release
112126 _SignType : none
113127 _DotNetPublishToBlobFeed : false
114- Release :
115- _BuildConfig : Release
116- _SignType : none
117- _DotNetPublishToBlobFeed : false
118- steps :
119- - checkout : self
120- clean : true
121- - script : eng/common/cibuild.sh
122- --configuration $(_BuildConfig)
123- --prepareMachine
124- displayName : Build
128+ steps :
129+ - checkout : self
130+ clean : true
131+ - script : eng/common/cibuild.sh
132+ --configuration $(_BuildConfig)
133+ --prepareMachine
134+ displayName : Build
125135
126- - job : OSX_10_13
127- displayName : ' OSX'
128- pool :
129- name : Hosted macOS
130- vmImage : macOS-10.13
131- strategy :
132- matrix :
133- ${{ if in(variables['Build.Reason'], 'PullRequest') }} :
134- Debug :
135- _BuildConfig : Debug
136+ - job : OSX_10_13
137+ displayName : ' OSX'
138+ pool :
139+ name : Hosted macOS
140+ vmImage : macOS-10.13
141+ strategy :
142+ matrix :
143+ ${{ if in(variables['Build.Reason'], 'PullRequest') }} :
144+ Debug :
145+ _BuildConfig : Debug
146+ _SignType : none
147+ _DotNetPublishToBlobFeed : false
148+ Release :
149+ _BuildConfig : Release
136150 _SignType : none
137151 _DotNetPublishToBlobFeed : false
138- Release :
139- _BuildConfig : Release
140- _SignType : none
141- _DotNetPublishToBlobFeed : false
142- steps :
143- - checkout : self
144- clean : true
145- - script : eng/common/cibuild.sh
146- --configuration $(_BuildConfig)
147- --prepareMachine
148- displayName : Build
152+ steps :
153+ - checkout : self
154+ clean : true
155+ - script : eng/common/cibuild.sh
156+ --configuration $(_BuildConfig)
157+ --prepareMachine
158+ displayName : Build
159+
160+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
161+ - template : eng\common\templates\post-build\post-build.yml
162+ parameters :
163+ enableSourceLinkValidation : false
0 commit comments