Skip to content

Commit 2ad522e

Browse files
authored
ci(windows): fix jvm selection for windows test (#5418)
extension of a6fb33c
1 parent d42fb07 commit 2ad522e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

buildspec/windowsTestsForAmazonQ.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ env:
88
phases:
99
install:
1010
commands:
11+
- # force install java21 while we work throuh path issues
12+
- |
13+
$javaName = "C:\Program Files\Amazon Corretto" | ForEach-Object {
14+
ls $_ | Where-Object {$_ -Like "jdk*"} | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
15+
}
16+
$JAVA_HOME = "C:\Program Files\Amazon Corretto\$javaName"
1117
- |
1218
if(-Not($Env:CODE_COV_TOKEN -eq $null)) {
1319
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;

buildspec/windowsTestsForCore.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ env:
88
phases:
99
install:
1010
commands:
11+
# force install java21 while we work throuh path issues
12+
- |
13+
$javaName = "C:\Program Files\Amazon Corretto" | ForEach-Object {
14+
ls $_ | Where-Object {$_ -Like "jdk*"} | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
15+
}
16+
$JAVA_HOME = "C:\Program Files\Amazon Corretto\$javaName"
1117
- |
1218
if(-Not($Env:CODE_COV_TOKEN -eq $null)) {
1319
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;

buildspec/windowsTestsForToolkit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ env:
88
phases:
99
install:
1010
commands:
11+
# force install java21 while we work throuh path issues
12+
- |
13+
$javaName = "C:\Program Files\Amazon Corretto" | ForEach-Object {
14+
ls $_ | Where-Object {$_ -Like "jdk*"} | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
15+
}
16+
$JAVA_HOME = "C:\Program Files\Amazon Corretto\$javaName"
1117
- |
1218
if(-Not($Env:CODE_COV_TOKEN -eq $null)) {
1319
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;

0 commit comments

Comments
 (0)