Skip to content

Commit

Permalink
Backport to branch(3.8) : Fix CosmosDB CI when running integration te…
Browse files Browse the repository at this point in the history
…st with JDK11+ (#1939)

Co-authored-by: Vincent Guilpain <[email protected]>
  • Loading branch information
feeblefakie and Torch3333 authored Jun 19, 2024
1 parent b7a501e commit f2024fa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,14 @@ jobs:
Export-Certificate @params
certutil -encode $home/tmp-cert.cer $home/cosmosdbcert.cer
Remove-Item $home/tmp-cert.cer
& ${env:JAVA_HOME}/bin/keytool.exe -keystore ${env:JAVA_HOME}/jre/lib/security/cacerts -storepass 'changeit' -importcert -noprompt -alias cosmos_emulator -file $home/cosmosdbcert.cer
& ${env:JAVA_HOME}/bin/keytool.exe -keystore ${env:JAVA_HOME}/jre/lib/security/cacerts -storepass 'changeit' -list -alias cosmos_emulator
# Setting the keystore option differs between Java 8 and Java 11+
if ( ${env:INT_TEST_JAVA_RUNTIME_VERSION} -eq '8' ) {
$keystore = "-keystore", "${env:JAVA_HOME}/jre/lib/security/cacerts"
} else {
$keystore = "-cacerts"
}
& ${env:JAVA_HOME}/bin/keytool.exe $keystore -storepass 'changeit' -importcert -noprompt -alias cosmos_emulator -file $home/cosmosdbcert.cer
& ${env:JAVA_HOME}/bin/keytool.exe $keystore -storepass 'changeit' -list -alias cosmos_emulator
- name: Setup and execute Gradle 'integrationTestCosmos' task
uses: gradle/gradle-build-action@v2
Expand Down

0 comments on commit f2024fa

Please sign in to comment.