Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions buildspec/windowsTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ env:
phases:
install:
commands:
# force install java21 while we work throuh path issues
- |
$url = 'https://corretto.aws/downloads/latest/amazon-corretto-21-x64-windows-jdk.msi';
Write-Host ('Downloading from {0}' -f $url);
[ Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
Invoke-WebRequest -Uri $url -OutFile 'corretto_jdk_build.msi';
Start-Process 'corretto_jdk_build.msi' -PassThru | Wait-Process;
Write-Host 'Removing ...';
Remove-Item corretto_jdk_build.msi -Force;
- |
$javaName = "C:\Program Files\Amazon Corretto" | ForEach-Object {
ls $_ | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
}
$JAVA_HOME = "C:\Program Files\Amazon Corretto\$javaName"
- |
if(-Not($Env:CODE_COV_TOKEN -eq $null)) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
Expand All @@ -21,6 +35,8 @@ phases:
# See https://github.com/NuGet/NuGet.Client/pull/4259
$Env:NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY = "3,1000"

$Env:JAVA_HOME = $JAVA_HOME

if ($Env:CODEARTIFACT_DOMAIN_NAME -and $Env:CODEARTIFACT_REPO_NAME) {
$Env:CODEARTIFACT_URL=aws codeartifact get-repository-endpoint --domain $Env:CODEARTIFACT_DOMAIN_NAME --repository $Env:CODEARTIFACT_REPO_NAME --format maven --query repositoryEndpoint --output text
# $Env:CODEARTIFACT_NUGET_URL=aws codeartifact get-repository-endpoint --domain $Env:CODEARTIFACT_DOMAIN_NAME --repository $Env:CODEARTIFACT_REPO_NAME --format nuget --query repositoryEndpoint --output text
Expand Down
Loading