Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!(ubuntu): Removed all definitions of 'default_jdk' from ubuntu image templates #1370

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 0 additions & 9 deletions provisioning/ubuntu-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,6 @@ function download_temurin_jdk() {
mkdir -p "${installation_dir}"
tar --extract --gunzip --file="${temp_archive}" --directory="${installation_dir}" --strip-components=1

# Define JDK installations
# The priority of a JDK is the last argument.
# Starts by setting priority to the JDK major version: higher version is the expected default
update-alternatives --install /usr/bin/java java "${installation_dir}"/bin/java "${major_jdk_version}"

rm -f "${temp_archive}"
}

Expand All @@ -359,10 +354,6 @@ function install_jdks() {
download_temurin_jdk "${jdk_version_to_install}"
echo "=== Installation of Temurin JDK version ${jdk_version_to_install} done."
done

# Use the DEFAULT_JDK env var to set the priority of the specified default JDK to 1000 to ensure its the one used by update-alternatives
update-alternatives --install /usr/bin/java java "/opt/jdk-${DEFAULT_JDK}/bin/java" 1000
echo "JAVA_HOME=/opt/jdk-${DEFAULT_JDK}" >> /etc/environment
}

## Ensure that docker-compose is installed (version from environment)
Expand Down
5 changes: 0 additions & 5 deletions tests/goss-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ command:
docker_buildx:
exec: docker buildx version
exit-status: 0
jayfranco999 marked this conversation as resolved.
Show resolved Hide resolved
default_java:
exec: java --version
exit-status: 0
stdout:
- 11.0.24+8
docker_compose:
exec: docker-compose -v
exit-status: 0
Expand Down
6 changes: 5 additions & 1 deletion tests/goss-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ command:
datadog-agent:
exec: datadog-agent version
exit-status: 0
default_java:
exec: java --version
exit-status:
not: 0
dduportal marked this conversation as resolved.
Show resolved Hide resolved
doctl:
exec: doctl version
exit-status: 0
Expand Down Expand Up @@ -75,7 +79,7 @@ command:
stderr:
- 1.8.0_422
maven:
exec: mvn -v
exec: JAVA_HOME=/opt/jdk-21 mvn -v
exit-status: 0
stdout:
- 3.9.9
Expand Down
5 changes: 5 additions & 0 deletions tests/goss-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ command:
docker-buildx:
exec: docker buildx version
exit-status: 0
default_java:
exec: java --version
exit-status: 0
jayfranco999 marked this conversation as resolved.
Show resolved Hide resolved
stdout:
- 11.0.24+8
jdk11:
exec: C:\tools\jdk-11\bin\java --version
exit-status: 0
Expand Down