Skip to content

Commit 3dd75ea

Browse files
authored
Grab some binary logs (#22380)
* Grab binary logs for main Windows and Linux jobs - in the Windows case, do not do this in official builds (logging slows build down) nit: do not set variables with only two values three times * Do not sign twice in Windows Code-sign build step nit: correct wording in Signing.props * !fixup! Don't grab the large x86 binary log
1 parent 059e2fd commit 3dd75ea

File tree

2 files changed

+46
-34
lines changed

2 files changed

+46
-34
lines changed

.azure/pipelines/ci.yml

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,50 @@ variables:
3232
value: .NETCORE
3333
- name: _DotNetValidationArtifactsCategory
3434
value: .NETCORE
35-
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
36-
- name: _UseHelixOpenQueues
37-
value: 'true'
35+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
36+
- name: _BuildArgs
37+
value: /p:TeamName=$(_TeamName)
38+
/p:OfficialBuildId=$(Build.BuildNumber)
39+
/p:SkipTestBuild=true
40+
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
41+
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
42+
- group: DotNet-Blob-Feed
43+
- group: Publish-Build-Assets
44+
# The following extra properties are not set when testing. Use with final build.[cmd,sh] of asset-producing jobs.
45+
- name: _PublishArgs
46+
value: /p:Publish=true
47+
/p:GenerateChecksums=true
48+
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
49+
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
50+
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
51+
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
52+
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
53+
# Do not log most Windows steps in official builds; this is the slowest job. Site extensions step always logs.
54+
- name: Windows64LogArgs
55+
value: -ExcludeCIBinaryLog
56+
- name: Windows86LogArgs
57+
value: -ExcludeCIBinaryLog
58+
- name: WindowsSignLogArgs
59+
value: -ExcludeCIBinaryLog
60+
- name: WindowsInstallersLogArgs
61+
value: -ExcludeCIBinaryLog
62+
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
3863
- name: _BuildArgs
3964
value: '/p:SkipTestBuild=true'
4065
- name: _PublishArgs
4166
value: ''
67+
# Write binary logs for all main Windows build steps except the x86 one in public and PR builds.
68+
- name: Windows64LogArgs
69+
value: /bl:artifacts/log/Release/Build.x64.binlog
70+
- name: Windows86LogArgs
71+
value: -ExcludeCIBinaryLog
72+
- name: WindowsSignLogArgs
73+
value: /bl:artifacts/log/Release/Build.CodeSign.binlog
74+
- name: WindowsInstallersLogArgs
75+
value: /bl:artifacts/log/Release/Build.Installers.binlog
76+
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
77+
- name: _UseHelixOpenQueues
78+
value: 'true'
4279
- name: _SignType
4380
value: ''
4481
- name: _InternalRuntimeDownloadArgs
@@ -59,35 +96,11 @@ variables:
5996
- name: _UseHelixOpenQueues
6097
value: 'false'
6198
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
62-
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
63-
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
64-
- group: DotNet-Blob-Feed
65-
- group: Publish-Build-Assets
66-
67-
- name: _BuildArgs
68-
value: /p:TeamName=$(_TeamName)
69-
/p:OfficialBuildId=$(Build.BuildNumber)
70-
/p:SkipTestBuild=true
7199
- name: _SignType
72100
value: real
73-
74-
# The following extra properties are not set when testing. Use with final build.[cmd,sh] of asset-producing jobs.
75-
- name: _PublishArgs
76-
value: /p:Publish=true
77-
/p:GenerateChecksums=true
78-
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
79-
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
80-
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
81-
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
82-
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
83-
84101
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
85-
- name: _BuildArgs
86-
value: '/p:SkipTestBuild=true'
87102
- name: _SignType
88103
value: test
89-
- name: _PublishArgs
90-
value: ''
91104

92105
stages:
93106
- stage: build
@@ -130,19 +143,18 @@ stages:
130143
# The sign settings have been configured to
131144
- script: ./build.cmd
132145
-ci
133-
-nobl
134146
-arch x64
135147
-pack
136148
-all
137149
$(_BuildArgs)
138150
$(_InternalRuntimeDownloadArgs)
151+
$(Windows64LogArgs)
139152
displayName: Build x64
140153

141154
# Build the x86 shared framework
142155
# This is going to actually build x86 native assets.
143156
- script: ./build.cmd
144157
-ci
145-
-nobl
146158
-noBuildRepoTasks
147159
-arch x86
148160
-pack
@@ -152,11 +164,11 @@ stages:
152164
/p:OnlyPackPlatformSpecificPackages=true
153165
$(_BuildArgs)
154166
$(_InternalRuntimeDownloadArgs)
167+
$(Windows86LogArgs)
155168
displayName: Build x86
156169

157170
- script: .\src\SiteExtensions\build.cmd
158171
-ci
159-
-nobl
160172
-noBuildRepoTasks
161173
-pack
162174
-noBuildDeps
@@ -171,19 +183,19 @@ stages:
171183
# previous steps. Sign check is disabled because it is run in a separate step below, after installers are built.
172184
- script: ./build.cmd
173185
-ci
174-
-nobl
175186
-noBuildRepoTasks
187+
-noBuildNative
176188
-noBuild
177189
-noRestore
178190
-sign
179191
/p:DotNetSignType=$(_SignType)
180192
$(_BuildArgs)
193+
$(WindowsSignLogArgs)
181194
displayName: Code sign packages
182195

183196
# Windows installers bundle both x86 and x64 assets
184197
- script: ./build.cmd
185198
-ci
186-
-nobl
187199
-noBuildRepoTasks
188200
-sign
189201
-buildInstallers
@@ -194,6 +206,7 @@ stages:
194206
$(_PublishArgs)
195207
$(_InternalRuntimeDownloadArgs)
196208
/p:PublishInstallerBaseVersion=true
209+
$(WindowsInstallersLogArgs)
197210
displayName: Build Installers
198211

199212
# A few files must also go to the VS package feed.
@@ -313,7 +326,6 @@ stages:
313326
steps:
314327
- script: ./build.sh
315328
--ci
316-
--nobl
317329
--arch x64
318330
--pack
319331
--all

eng/Signing.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<FileExtensionSignInfo Include=".msi" CertificateName="None" />
3030

3131
<!--
32-
Use the PublicKeyToken of .NET assemblies to determine with authenticode cert to use.
32+
Use the PublicKeyToken of .NET assemblies to determine which authenticode cert to use.
3333
'None' is required to ensure code signing does not attempt to re-sign them or submit
3434
to ESPR for strong-naming signing. We don't delay sign, so we only need to authenticode sign.
3535
See https://github.com/dotnet/arcade/issues/1911 for context.

0 commit comments

Comments
 (0)