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

UnixPB: Change default JDK for alpine arm64 #3252

Merged
merged 1 commit into from
Nov 15, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
register: usr_lib_jvm_exists
tags: build_tools

- name: Checking for default-jvm
stat: path=/usr/lib/jvm/default-jvm
register: usr_lib_default_jvm_exists
tags: build_tools

- name: Creating /usr/lib/jvm if not found
file:
path: /usr/lib/jvm
Expand Down Expand Up @@ -140,14 +145,14 @@

- name: Install java 11 from Alpine repositories
package: "name=openjdk11 state=installed"
when: not adoptopenjdk11_installed.stat.exists
when: ansible_architecture != "aarch64" and not adoptopenjdk11_installed.stat.exists

- name: Create symlink to point at openjdk11
file:
src: /usr/lib/jvm/java-11-openjdk
dest: /usr/lib/jvm/jdk-11
state: link
when: not adoptopenjdk11_installed.stat.exists
when: ansible_architecture != "aarch64" and not adoptopenjdk11_installed.stat.exists

- name: Check if zulu-16 is already installed in the target location
stat: path=/usr/lib/jvm/zulu16
Expand Down Expand Up @@ -201,6 +206,19 @@
when:
- not adoptopenjdk17_installed.stat.exists

- name: Remove Default JVM For Alpine AARCH64
file:
path: /usr/lib/jvm/default-jvm
state: absent
when: ansible_architecture == "aarch64" and usr_lib_default_jvm_exists.stat.exists

- name: Arm64 Change Default JVM Link to JDK17
file:
src: '{{ adoptopenjdk17_dir.stdout }}'
dest: /usr/lib/jvm/default-jvm
state: link
when: ansible_architecture == "aarch64"

- name: Check if zulu-18 is already installed in the target location
stat: path=/usr/lib/jvm/zulu18
register: zulu18_installed
Expand Down
Loading