Skip to content

Commit

Permalink
feat!(windows): Removed all definitions of 'default_jdk' from windows…
Browse files Browse the repository at this point in the history
… image templates (#1378)

* feat!(packer-images): Removed all definitions of 'default_jdk' from windows-2019 SSH agents

Signed-off-by: jayfranco999 <[email protected]>

* fix-up

Signed-off-by: jayfranco999 <[email protected]>

* fixup

Signed-off-by: jayfranco999 <[email protected]>

* fixup

Signed-off-by: jayfranco999 <[email protected]>

* fixup(last default_jdk instance)

Signed-off-by: jayfranco999 <[email protected]>

* fixup(remove updateDefaultJDKVersionInGoss)

Signed-off-by: jayfranco999 <[email protected]>

* fixup(common contract)

Signed-off-by: jayfranco999 <[email protected]>

---------

Signed-off-by: jayfranco999 <[email protected]>
  • Loading branch information
jayfranco999 authored Sep 4, 2024
1 parent 6ecd9b8 commit a071a42
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 27 deletions.
1 change: 0 additions & 1 deletion provisioning/tools-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions provisioning/windows-provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions tests/goss-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions tests/goss-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions tests/goss-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 0 additions & 8 deletions updatecli/updatecli.d/jdk11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a071a42

Please sign in to comment.