diff --git a/provisioning/tools-versions.yml b/provisioning/tools-versions.yml index 65d676d11..dfd8fcc21 100644 --- a/provisioning/tools-versions.yml +++ b/provisioning/tools-versions.yml @@ -6,7 +6,6 @@ azurecli_version: 2.64.0 chocolatey_version: 1.4.0 compose_version: 2.29.2 cst_version: 1.19.1 -default_jdk: 11 docker_version: 27.1.2 docker_buildx_version: 0.14.1 doctl_version: 1.111.0 diff --git a/provisioning/windows-provision.ps1 b/provisioning/windows-provision.ps1 index 3a0a1cec3..c130c5d45 100644 --- a/provisioning/windows-provision.ps1 +++ b/provisioning/windows-provision.ps1 @@ -294,15 +294,6 @@ if("2019" -eq $env:AGENT_OS_VERSION) { ## Add tools folder to PATH so we can sanity check them as soon as they are installed AddToPathEnv $baseDir -## Sets the default JDK -$defaultJavaHome = '{0}\jdk-{1}' -f $baseDir,$env:DEFAULT_JDK -$defaultJavaBinPath = '{0}\bin' -f $defaultJavaHome -AddToPathEnv $defaultJavaBinPath -# env JAVA_HOME -New-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name 'JAVA_HOME' -Value $defaultJavaHome | Out-Null -## Maven requires the JAVA_HOME environment variable to be set. We use this value here: it is ephemeral. -$env:JAVA_HOME = $defaultJavaHome - ## Proceed to install tools # TODO: foreach in parallel for downloads foreach($k in $downloads.Keys) { diff --git a/tests/goss-common.yaml b/tests/goss-common.yaml index edb2041e9..490b9860d 100644 --- a/tests/goss-common.yaml +++ b/tests/goss-common.yaml @@ -27,6 +27,10 @@ command: docker_buildx: exec: docker buildx version exit-status: 0 + default_java: + exec: java --version + exit-status: + not: 0 docker_compose: exec: docker-compose -v exit-status: 0 diff --git a/tests/goss-linux.yaml b/tests/goss-linux.yaml index c45feaabb..9f54601b5 100644 --- a/tests/goss-linux.yaml +++ b/tests/goss-linux.yaml @@ -17,10 +17,6 @@ command: datadog-agent: exec: datadog-agent version exit-status: 0 - default_java: - exec: java --version - exit-status: - not: 0 doctl: exec: doctl version exit-status: 0 diff --git a/tests/goss-windows.yaml b/tests/goss-windows.yaml index 97b6a77b4..c06bec88c 100644 --- a/tests/goss-windows.yaml +++ b/tests/goss-windows.yaml @@ -10,11 +10,6 @@ command: docker-buildx: exec: docker buildx version exit-status: 0 - default_java: - exec: java --version - exit-status: 0 - stdout: - - 11.0.24+8 jdk11: exec: C:\tools\jdk-11\bin\java --version exit-status: 0 @@ -35,6 +30,11 @@ command: exit-status: 0 stderr: - 1.8.0_422 + maven: + exec: pwsh -command "$env:JAVA_HOME='C:\\Program Files (x86)\\jdk-21'; mvn -v" + exit-status: 0 + stdout: + - 3.9.9 nodejs: exec: node --version exit-status: 0 diff --git a/updatecli/updatecli.d/jdk11.yml b/updatecli/updatecli.d/jdk11.yml index 992092db5..df51f946a 100644 --- a/updatecli/updatecli.d/jdk11.yml +++ b/updatecli/updatecli.d/jdk11.yml @@ -56,14 +56,6 @@ targets: - tests/goss-windows.yaml key: $.command.jdk11.stdout[0] scmid: default - updateDefaultJDKVersionInGoss: - name: Update the default Java version in the goss tests - kind: yaml - spec: - files: - - tests/goss-common.yaml - key: $.command.default_java.stdout[0] - scmid: default actions: default: