From 59c87f6e6932f1106da709bd874d5e3c129ce818 Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Tue, 30 Aug 2022 17:09:18 -0700
Subject: [PATCH] Use normal `$(_BuildArgs)` in internal jobs w/ binlogs
 (#43597)

- give `$(*LogArgs)` variables slightly different conditions from `$(_BuildArgs)`, `$(_PublishArgs)`, &hellip;
  - that is, previous variable groupings were slightly off
- enabling binary logs previously broke manifest creation etc.
---
 .azure/pipelines/ci.yml | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index 6db014e6101..e1f6e2da2d4 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -72,30 +72,32 @@ variables:
            /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
            /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
            /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
-  # Do not log most Windows steps in official builds; this is the slowest job. Site extensions step always logs.
-  - name: WindowsArm64LogArgs
-    value: -ExcludeCIBinaryLog
-  - name: Windows64LogArgs
-    value: -ExcludeCIBinaryLog
-  - name: Windows86LogArgs
-    value: -ExcludeCIBinaryLog
-  - name: WindowsSignLogArgs
-    value: -ExcludeCIBinaryLog
-  - name: WindowsInstallersLogArgs
-    value: -ExcludeCIBinaryLog
-  - name: WindowsArm64InstallersLogArgs
-    value: -ExcludeCIBinaryLog
   # Variables for source indexing afterBuild step and job.
   - name: sourceIndexPackageVersion
     value: 1.0.1-20210614.1
   - name: sourceIndexPackageSource
     value: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
   - group: source-dot-net stage1 variables
-- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), eq(parameters.produceBinlogs, 'true')) }}:
+  - ${{ if ne(parameters.produceBinlogs, 'true') }}:
+    # Do not log most Windows steps in official builds; this is the slowest job. Site extensions step always logs.
+    - name: WindowsArm64LogArgs
+      value: -ExcludeCIBinaryLog
+    - name: Windows64LogArgs
+      value: -ExcludeCIBinaryLog
+    - name: Windows86LogArgs
+      value: -ExcludeCIBinaryLog
+    - name: WindowsSignLogArgs
+      value: -ExcludeCIBinaryLog
+    - name: WindowsInstallersLogArgs
+      value: -ExcludeCIBinaryLog
+    - name: WindowsArm64InstallersLogArgs
+      value: -ExcludeCIBinaryLog
+- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
   - name: _BuildArgs
     value: '/p:SkipTestBuild=true /p:PostBuildSign=$(PostBuildSign)'
   - name: _PublishArgs
     value: ''
+- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), eq(parameters.produceBinlogs, 'true')) }}:
   # Write binary logs for all main Windows build steps except the x86 one in public and PR builds.
   - name: WindowsArm64LogArgs
     value: /bl:artifacts/log/Release/Build.arm64.binlog
-- 
GitLab