From c401d387047511abafe6c899f616c18326020f53 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Thu, 7 Mar 2024 13:04:38 -0800 Subject: [PATCH 1/7] Install java via native tools in CI The VMR doesn't have Java installed globally on the machines, but it does have it in the native tool cache. This PR updates the build scripts to use the native tool cache to install Java in CI builds. I've also updated to 11.0.22 (vs. the .3 version from 2019) and the script used to pull this from native tool assets. --- .azure/pipelines/ci.yml | 8 +- .azure/pipelines/jobs/default-build.yml | 8 +- eng/build.ps1 | 121 ++++++++++++++---------- eng/scripts/InstallJdk.ps1 | 7 +- global.json | 5 +- 5 files changed, 82 insertions(+), 67 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index f1d13890ebbb..022c3b14e6e8 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -200,7 +200,8 @@ stages: steps: - script: ./eng/build.cmd -ci - -prepareMachine + -prepareMchine + -nativeToolsOnMachine -arch x64 -all $(_BuildArgs) @@ -252,6 +253,7 @@ stages: - script: ./eng/build.cmd -ci -prepareMachine + -nativeToolsOnMachine -arch x64 -pack -all @@ -737,11 +739,11 @@ stages: timeoutInMinutes: 240 steps: # Build the shared framework - - script: ./eng/build.cmd -ci -prepareMachine -nobl -all -pack -arch x64 + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64 /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) displayName: Build shared fx # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. - - script: ./eng/build.cmd -ci -prepareMachine -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) displayName: Run build.cmd helix target diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index f23379c0772b..a38951c847a2 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -68,7 +68,6 @@ parameters: container: '' enableRichCodeNavigation: '' installNodeJs: true - installJdk: true # Ignored unless agentOs == Windows. timeoutInMinutes: 180 testRunTitle: $(AgentOsName)-$(BuildConfiguration) useHostedUbuntu: true @@ -147,8 +146,6 @@ jobs: - LC_ALL: 'en_US.UTF-8' - LANG: 'en_US.UTF-8' - LANGUAGE: 'en_US.UTF-8' - - ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}: - - JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk\win-x64 - ${{ if or(ne(parameters.codeSign, true), ne(variables['System.TeamProject'], 'internal')) }}: - _SignType: '' - ${{ if and(eq(parameters.codeSign, true), eq(variables['System.TeamProject'], 'internal')) }}: @@ -202,9 +199,6 @@ jobs: displayName: Install Node 20.x inputs: versionSpec: 20.x - - ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}: - - powershell: ./eng/scripts/InstallJdk.ps1 - displayName: Install JDK 11 - ${{ if eq(parameters.isAzDOTestingJob, true) }}: - powershell: | Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\" @@ -256,7 +250,7 @@ jobs: ${{ step.env }} - ${{ if eq(parameters.steps, '')}}: - ${{ if eq(parameters.agentOs, 'Windows') }}: - - script: $(BuildDirectory)\build.cmd -ci -prepareMachine -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs) + - script: $(BuildDirectory)\build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs) /p:DotNetSignType=$(_SignType) displayName: Run build.cmd env: diff --git a/eng/build.ps1 b/eng/build.ps1 index 9cc645fafaa7..4a5e9113aed4 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -15,6 +15,9 @@ Sets up CI specific settings and variables. .PARAMETER PrepareMachine In CI, Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes). +.PARAMETER NativeToolsOnMachine +Turns on native tooling handling. On CI machines, promotes native tools listed in global.json to the path. + .PARAMETER Restore Run restore. @@ -128,6 +131,7 @@ Online version: https://github.com/dotnet/aspnetcore/blob/main/docs/BuildFromSou param( [switch]$CI, [switch]$PrepareMachine, + [switch]$NativeToolsOnMachine, # Build lifecycle options [switch]$Restore, @@ -312,58 +316,6 @@ $performDesktopBuild = ($BuildInstallers -and $Architecture -ne "arm") -or ` $performDotnetBuild = $BuildJava -or $BuildManaged -or $BuildNodeJS -or ` ($All -and -not ($NoBuildJava -and $NoBuildManaged -and $NoBuildNodeJS)) -or ` ($Projects -and -not ($BuildInstallers -or $specifiedBuildNative)) -$foundJdk = $false -$javac = Get-Command javac -ErrorAction Ignore -CommandType Application -$localJdkPath = "$PSScriptRoot\..\.tools\jdk\win-x64\" -if (Test-Path "$localJdkPath\bin\javac.exe") { - $foundJdk = $true - Write-Host -f Magenta "Detected JDK in $localJdkPath (via local repo convention)" - $env:JAVA_HOME = $localJdkPath -} -elseif ($env:JAVA_HOME) { - if (-not (Test-Path "${env:JAVA_HOME}\bin\javac.exe")) { - Write-Error "The environment variable JAVA_HOME was set, but ${env:JAVA_HOME}\bin\javac.exe does not exist. Remove JAVA_HOME or update it to the correct location for the JDK. See https://www.bing.com/search?q=java_home for details." - } - else { - Write-Host -f Magenta "Detected JDK in ${env:JAVA_HOME} (via JAVA_HOME)" - $foundJdk = $true - } -} -elseif ($javac) { - $foundJdk = $true - $javaHome = Split-Path -Parent (Split-Path -Parent $javac.Path) - $env:JAVA_HOME = $javaHome - Write-Host -f Magenta "Detected JDK in $javaHome (via PATH)" -} -else { - try { - $jdkRegistryKeys = @( - "HKLM:\SOFTWARE\JavaSoft\JDK", # for JDK 10+ - "HKLM:\SOFTWARE\JavaSoft\Java Development Kit" # fallback for JDK 8 - ) - $jdkRegistryKey = $jdkRegistryKeys | Where-Object { Test-Path $_ } | Select-Object -First 1 - if ($jdkRegistryKey) { - $jdkVersion = (Get-Item $jdkRegistryKey | Get-ItemProperty -name CurrentVersion).CurrentVersion - $javaHome = (Get-Item $jdkRegistryKey\$jdkVersion | Get-ItemProperty -Name JavaHome).JavaHome - if (Test-Path "${javaHome}\bin\javac.exe") { - $env:JAVA_HOME = $javaHome - Write-Host -f Magenta "Detected JDK $jdkVersion in $env:JAVA_HOME (via registry)" - $foundJdk = $true - } - } - } - catch { - Write-Verbose "Failed to detect Java: $_" - } -} - -if ($env:PATH -notlike "*${env:JAVA_HOME}*") { - $env:PATH = "$(Join-Path $env:JAVA_HOME bin);${env:PATH}" -} - -if (-not $foundJdk -and $RunBuild -and ($All -or $BuildJava) -and -not $NoBuildJava) { - Write-Error "Could not find the JDK. Either run $PSScriptRoot\scripts\InstallJdk.ps1 to install for this repo, or install the JDK globally on your machine (see $PSScriptRoot\..\docs\BuildFromSource.md for details)." -} # Initialize global variables need to be set before the import of Arcade is imported $restore = $RunRestore @@ -392,6 +344,62 @@ Remove-Item variable:global:_MSBuildExe -ea Ignore # Import Arcade . "$PSScriptRoot/common/tools.ps1" +function LocateJava { + Write-Host "Locating java" + $foundJdk = $false + $javac = Get-Command javac -ErrorAction Ignore -CommandType Application + $localJdkPath = "$PSScriptRoot\..\.tools\jdk\win-x64\" + if (Test-Path "$localJdkPath\bin\javac.exe") { + $foundJdk = $true + Write-Host -f Magenta "Detected JDK in $localJdkPath (via local repo convention)" + $env:JAVA_HOME = $localJdkPath + } + elseif ($env:JAVA_HOME) { + if (-not (Test-Path "${env:JAVA_HOME}\bin\javac.exe")) { + Write-Error "The environment variable JAVA_HOME was set, but ${env:JAVA_HOME}\bin\javac.exe does not exist. Remove JAVA_HOME or update it to the correct location for the JDK. See https://www.bing.com/search?q=java_home for details." + } + else { + Write-Host -f Magenta "Detected JDK in ${env:JAVA_HOME} (via JAVA_HOME)" + $foundJdk = $true + } + } + elseif ($javac) { + $foundJdk = $true + $javaHome = Split-Path -Parent (Split-Path -Parent $javac.Path) + $env:JAVA_HOME = $javaHome + Write-Host -f Magenta "Detected JDK in $javaHome (via PATH)" + } + else { + try { + $jdkRegistryKeys = @( + "HKLM:\SOFTWARE\JavaSoft\JDK", # for JDK 10+ + "HKLM:\SOFTWARE\JavaSoft\Java Development Kit" # fallback for JDK 8 + ) + $jdkRegistryKey = $jdkRegistryKeys | Where-Object { Test-Path $_ } | Select-Object -First 1 + if ($jdkRegistryKey) { + $jdkVersion = (Get-Item $jdkRegistryKey | Get-ItemProperty -name CurrentVersion).CurrentVersion + $javaHome = (Get-Item $jdkRegistryKey\$jdkVersion | Get-ItemProperty -Name JavaHome).JavaHome + if (Test-Path "${javaHome}\bin\javac.exe") { + $env:JAVA_HOME = $javaHome + Write-Host -f Magenta "Detected JDK $jdkVersion in $env:JAVA_HOME (via registry)" + $foundJdk = $true + } + } + } + catch { + Write-Verbose "Failed to detect Java: $_" + } + } + + if ($env:PATH -notlike "*${env:JAVA_HOME}*") { + $env:PATH = "$(Join-Path $env:JAVA_HOME bin);${env:PATH}" + } + + if (-not $foundJdk -and $RunBuild -and ($All -or $BuildJava) -and -not $NoBuildJava) { + Write-Error "Could not find the JDK. Either run $PSScriptRoot\scripts\InstallJdk.ps1 to install for this repo, or install the JDK globally on your machine (see $PSScriptRoot\..\docs\BuildFromSource.md for details)." + } +} + # Add default .binlog location if not already on the command line. tools.ps1 does not handle this; it just checks # $BinaryLog, $CI and $ExcludeCIBinarylog values for an error case. But tools.ps1 provides a nice function to help. if ($BinaryLog) { @@ -424,6 +432,15 @@ try { $tmpRestore = $restore $restore = $true + # Initialize the native tools before locating java. + if ($NativeToolsOnMachine) { + $env:NativeToolsOnMachine=$true + InitializeNativeTools + } + + # Locate java, now that we may have java available after initializing native tools. + LocateJava + $toolsetBuildProj = InitializeToolset $restore = $tmpRestore diff --git a/eng/scripts/InstallJdk.ps1 b/eng/scripts/InstallJdk.ps1 index 6440cb1c2812..0872f241a982 100644 --- a/eng/scripts/InstallJdk.ps1 +++ b/eng/scripts/InstallJdk.ps1 @@ -23,7 +23,7 @@ $javacExe = "$installDir\bin\javac.exe" $tempDir = "$repoRoot\obj" if (-not $JdkVersion) { $globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json - $JdkVersion = $globalJson.tools.jdk + $JdkVersion = $globalJson.'native-tools'.jdk } if (Test-Path $javacExe) { @@ -40,12 +40,13 @@ Remove-Item -Force -Recurse $tempDir -ErrorAction Ignore | out-null mkdir $tempDir -ea Ignore | out-null mkdir $installDir -ea Ignore | out-null Write-Host "Starting download of JDK ${JdkVersion}" -& $PSScriptRoot\Download.ps1 "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/java/jdk-${JdkVersion}_windows-x64_bin.zip" "$tempDir/jdk.zip" +& $PSScriptRoot\Download.ps1 "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/java/microsoft-jdk-${JdkVersion}-windows-x64.zip" "$tempDir/jdk.zip" Write-Host "Done downloading JDK ${JdkVersion}" Expand-Archive "$tempDir/jdk.zip" -d "$tempDir/jdk/" Write-Host "Expanded JDK to $tempDir" Write-Host "Installing JDK to $installDir" -Move-Item "$tempDir/jdk/jdk-${JdkVersion}/*" $installDir +# The name of the file directory within the zip is based on the version, but may contain a +N for build number. +Move-Item "$(Get-ChildItem -Path "$tempDir/jdk" | Select-Object -First 1)/*" $installDir Write-Host "Done installing JDK to $installDir" if ($env:TF_BUILD) { diff --git a/global.json b/global.json index f60234c6d94a..be83e2bce11d 100644 --- a/global.json +++ b/global.json @@ -12,8 +12,6 @@ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" ] }, - "Git": "2.22.0", - "jdk": "11.0.3", "vs": { "version": "17.2", "components": [ @@ -25,6 +23,9 @@ }, "xcopy-msbuild": "17.1.0" }, + "native-tools": { + "jdk": "11.0.22" + }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24151.5", "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24151.5" From 012957039b51b6507e2e366906ef98e4d5f35b70 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 12 Mar 2024 13:53:36 -0700 Subject: [PATCH 2/7] Tweaks --- .azure/pipelines/ci.yml | 2 +- .azure/pipelines/jobs/codesign-xplat.yml | 1 - eng/build.ps1 | 3 ++- eng/common/tools.ps1 | 4 ++-- eng/configure-toolset.sh | 9 ++------- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 022c3b14e6e8..b6a4d4e6363d 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -201,7 +201,7 @@ stages: - script: ./eng/build.cmd -ci -prepareMchine - -nativeToolsOnMachine + -nativeToolsOnMachine -arch x64 -all $(_BuildArgs) diff --git a/.azure/pipelines/jobs/codesign-xplat.yml b/.azure/pipelines/jobs/codesign-xplat.yml index c96dc12f93ad..8e2ab0fd2e03 100644 --- a/.azure/pipelines/jobs/codesign-xplat.yml +++ b/.azure/pipelines/jobs/codesign-xplat.yml @@ -13,7 +13,6 @@ jobs: jobDisplayName: "Code-sign ${{ parameters.inputName }} packages" agentOs: Windows installNodeJs: false - installJdk: false steps: - task: DownloadBuildArtifacts@0 displayName: Download ${{ parameters.inputName }} artifacts diff --git a/eng/build.ps1 b/eng/build.ps1 index 4a5e9113aed4..68f7ea43182e 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -345,7 +345,6 @@ Remove-Item variable:global:_MSBuildExe -ea Ignore . "$PSScriptRoot/common/tools.ps1" function LocateJava { - Write-Host "Locating java" $foundJdk = $false $javac = Get-Command javac -ErrorAction Ignore -CommandType Application $localJdkPath = "$PSScriptRoot\..\.tools\jdk\win-x64\" @@ -435,6 +434,8 @@ try { # Initialize the native tools before locating java. if ($NativeToolsOnMachine) { $env:NativeToolsOnMachine=$true + # Do not promote native tools except in cases where -NativeToolsOnMachine is passed. + # Currently the JDK is laid out in an incorrect pattern: https://github.com/dotnet/dnceng/issues/2185 InitializeNativeTools } diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9bf873e3c258..c72994fc6e05 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -296,7 +296,7 @@ function InstallDotNet([string] $dotnetRoot, if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" } if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" } $runtimePath = $runtimePath + "\" + $version - + $dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'" if (Test-Path $runtimePath) { @@ -608,7 +608,7 @@ function InitializeBuildTool() { } else { $initializeBuildToolFramework=$env:_OverrideArcadeInitializeBuildToolFramework } - + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = $initializeBuildToolFramework } } elseif ($msbuildEngine -eq "vs") { try { diff --git a/eng/configure-toolset.sh b/eng/configure-toolset.sh index ea92acd6a37b..73239294056d 100755 --- a/eng/configure-toolset.sh +++ b/eng/configure-toolset.sh @@ -1,7 +1,2 @@ -# We can't use already installed dotnet cli since we need to install additional shared runtimes. -# We could potentially try to find an existing installation that has all the required runtimes, -# but it's unlikely one will be available. - -if [ "${DotNetBuildFromSource:-false}" = false ]; then - use_installed_dotnet_cli="false" -fi +# Working around issue https://github.com/dotnet/arcade/issues/2673 +DisableNativeToolsetInstalls=true From 7e65497b55a38504cd89adeb1936883253535a63 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 12 Mar 2024 13:54:34 -0700 Subject: [PATCH 3/7] Tweaks --- eng/configure-toolset.sh | 8 ++++++++ src/submodules/googletest | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/eng/configure-toolset.sh b/eng/configure-toolset.sh index 73239294056d..f8c25a43cc39 100755 --- a/eng/configure-toolset.sh +++ b/eng/configure-toolset.sh @@ -1,2 +1,10 @@ +# We can't use already installed dotnet cli since we need to install additional shared runtimes. +# We could potentially try to find an existing installation that has all the required runtimes, +# but it's unlikely one will be available. + +if [ "${DotNetBuildFromSource:-false}" = false ]; then + use_installed_dotnet_cli="false" +fi + # Working around issue https://github.com/dotnet/arcade/issues/2673 DisableNativeToolsetInstalls=true diff --git a/src/submodules/googletest b/src/submodules/googletest index e1a38bc37077..31993dfa6b47 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit e1a38bc3707741d249fa22d2064552a08e37555b +Subproject commit 31993dfa6b47e11c7a6ef67cfa8af90892b9bd1c From 63bba52a38df4530217af4ab27abfc2d9ffb1218 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 12 Mar 2024 14:07:20 -0700 Subject: [PATCH 4/7] Revert submodules --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index 31993dfa6b47..e1a38bc37077 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 31993dfa6b47e11c7a6ef67cfa8af90892b9bd1c +Subproject commit e1a38bc3707741d249fa22d2064552a08e37555b From 03113610c02643eb9858aed6fca82f6d69a0c0e0 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 12 Mar 2024 14:09:08 -0700 Subject: [PATCH 5/7] Change tempdir --- eng/scripts/InstallGoogleChrome.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/scripts/InstallGoogleChrome.ps1 b/eng/scripts/InstallGoogleChrome.ps1 index 2159c7de09d1..30b792d1b15a 100644 --- a/eng/scripts/InstallGoogleChrome.ps1 +++ b/eng/scripts/InstallGoogleChrome.ps1 @@ -1,4 +1,6 @@ -$InstallerPath = "$env:Temp\chrome_installer.exe"; +$tempDir = "$repoRoot\obj" +mkdir $tempDir -ea Ignore | out-null +$InstallerPath = "$tempDir\chrome_installer.exe"; & $PSScriptRoot\Download.ps1 "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" $InstallerPath Start-Process -FilePath $InstallerPath -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $InstallerPath From 732cae4e92bcc3bf9ba3944a40e3ef26e4c5d4dc Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 12 Mar 2024 15:23:39 -0700 Subject: [PATCH 6/7] Install chrome only on windows --- .azure/pipelines/jobs/default-build.yml | 10 +++++----- eng/scripts/InstallGoogleChrome.ps1 | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index a38951c847a2..d9226bc9201e 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -199,11 +199,11 @@ jobs: displayName: Install Node 20.x inputs: versionSpec: 20.x - - ${{ if eq(parameters.isAzDOTestingJob, true) }}: - - powershell: | - Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\" - ./eng/scripts/InstallGoogleChrome.ps1 - displayName: Install Chrome + - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true) }}: + - powershell: | + Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\" + ./eng/scripts/InstallGoogleChrome.ps1 + displayName: Install Chrome - ${{ if eq(parameters.agentOs, 'Windows') }}: - powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools" displayName: Add dotnet tools to path diff --git a/eng/scripts/InstallGoogleChrome.ps1 b/eng/scripts/InstallGoogleChrome.ps1 index 30b792d1b15a..2159c7de09d1 100644 --- a/eng/scripts/InstallGoogleChrome.ps1 +++ b/eng/scripts/InstallGoogleChrome.ps1 @@ -1,6 +1,4 @@ -$tempDir = "$repoRoot\obj" -mkdir $tempDir -ea Ignore | out-null -$InstallerPath = "$tempDir\chrome_installer.exe"; +$InstallerPath = "$env:Temp\chrome_installer.exe"; & $PSScriptRoot\Download.ps1 "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" $InstallerPath Start-Process -FilePath $InstallerPath -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $InstallerPath From 3223f094d6b0a093794e2498b951822adf81d560 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 12 Mar 2024 15:34:43 -0700 Subject: [PATCH 7/7] Fix yer yamls --- .azure/pipelines/jobs/default-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index d9226bc9201e..310725a65225 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -199,7 +199,7 @@ jobs: displayName: Install Node 20.x inputs: versionSpec: 20.x - - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true) }}: + - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}: - powershell: | Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\" ./eng/scripts/InstallGoogleChrome.ps1