From a273eaca4462d49e0a00d49cd080dc11ea865b5e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 30 Aug 2021 12:23:40 +0000 Subject: Update dependencies from https://github.com/dotnet/arcade build 20210827.6 (#2239) [main] Update dependencies from dotnet/arcade --- eng/common/build.sh | 5 ++++- eng/common/post-build/sourcelink-validation.ps1 | 8 ++++++-- eng/common/sdk-task.ps1 | 4 +++- eng/common/templates/job/job.yml | 2 +- eng/common/tools.ps1 | 6 +++--- eng/common/tools.sh | 2 +- 6 files changed, 18 insertions(+), 9 deletions(-) (limited to 'eng/common') diff --git a/eng/common/build.sh b/eng/common/build.sh index 9d3042a94..bc07a1c68 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -187,7 +187,10 @@ function InitializeCustomToolset { } function Build { - TryLogClientIpAddress + + if [[ "$ci" == true ]]; then + TryLogClientIpAddress + fi InitializeToolset InitializeCustomToolset diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 index 3b6fc9533..e8ab29afe 100644 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -107,8 +107,12 @@ $ValidatePackage = { try { $Uri = $Link -as [System.URI] - # Only GitHub links are valid - if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) { + if ($Link -match "submodules") { + # Skip submodule links until sourcelink properly handles submodules + $Status = 200 + } + elseif ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) { + # Only GitHub links are valid $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode } else { diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index 7ffa3591e..7ab9baac5 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -83,7 +83,9 @@ try { } if ($restore) { - Try-LogClientIpAddress + if ($ci) { + Try-LogClientIpAddress + } Build 'Restore' } diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 866967934..37dceb1ba 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -103,7 +103,7 @@ jobs: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - task: MicroBuildSigningPlugin@2 + - task: MicroBuildSigningPlugin@3 displayName: Install MicroBuild plugin inputs: signType: $(_SignType) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index e607aa436..56ee4a577 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -154,9 +154,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { return $global:_DotNetInstallDir } - # In case of network error, try to log the current IP for reference - Try-LogClientIpAddress - # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism $env:DOTNET_MULTILEVEL_LOOKUP=0 @@ -166,6 +163,9 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { # Disable telemetry on CI. if ($ci) { $env:DOTNET_CLI_TELEMETRY_OPTOUT=1 + + # In case of network error, try to log the current IP for reference + Try-LogClientIpAddress } # Source Build uses DotNetCoreSdkDir variable diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 3c5f3a12c..41e323104 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -402,7 +402,7 @@ function StopProcesses { function TryLogClientIpAddress () { echo 'Attempting to log this client''s IP for Azure Package feed telemetry purposes' if command -v curl > /dev/null; then - curl -s 'http://co1.msedge.net/fdv2/diagnostics.aspx' | grep ' IP: ' + curl -s 'http://co1.msedge.net/fdv2/diagnostics.aspx' | grep ' IP: ' || true fi } -- cgit v1.2.3