diff --git a/ansible/docker/Dockerfile.Alpine3 b/ansible/docker/Dockerfile.Alpine3 index 56de2d284b..638505797b 100644 --- a/ansible/docker/Dockerfile.Alpine3 +++ b/ansible/docker/Dockerfile.Alpine3 @@ -14,15 +14,11 @@ RUN set -eux; \ rm -rf /ansible; apk del ansible ENV \ - JDK7_BOOT_DIR="/usr/lib/jvm/zulu8" \ - JDK8_BOOT_DIR="/usr/lib/jvm/zulu8" \ - JDK10_BOOT_DIR="/usr/lib/jvm/zulu11" \ - JDK11_BOOT_DIR="/usr/lib/jvm/zulu11" \ - JDK14_BOOT_DIR="/usr/lib/jvm/zulu14" \ - JDK15_BOOT_DIR="/usr/lib/jvm/zulu15" \ - JDK16_BOOT_DIR="/usr/lib/jvm/zulu16" \ - JDK17_BOOT_DIR="/usr/lib/jvm/zulu17" \ - JDK18_BOOT_DIR="/usr/lib/jvm/zulu18" \ - JDK19_BOOT_DIR="/usr/lib/jvm/zulu18" \ - JDKLATEST_BOOT_DIR="/usr/lib/jvm/zulu18" \ - JAVA_HOME="/usr/lib/jvm/zulu8" + JDK7_BOOT_DIR="/usr/lib/jvm/jdk-7" \ + JDK8_BOOT_DIR="/usr/lib/jvm/jdk-8" \ + JDK10_BOOT_DIR="/usr/lib/jvm/jdk-11" \ + JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \ + JDK16_BOOT_DIR="/usr/lib/jvm/jdk-16" \ + JDK17_BOOT_DIR="/usr/lib/jvm/jdk-17" \ + JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-17" \ + JAVA_HOME="/usr/lib/jvm/jdk-8" diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml index 652d04f45f..2b52093183 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml @@ -79,7 +79,6 @@ - role: adoptopenjdk_install jdk_version: 8 when: - - ansible_distribution != "Alpine" - ansible_architecture != "riscv64" tags: build_tools - role: adoptopenjdk_install # JDK11 Build Bootstrap @@ -93,7 +92,6 @@ - role: adoptopenjdk_install jdk_version: 11 when: - - ansible_distribution != "Alpine" - ansible_distribution != "Solaris" - ansible_architecture != "riscv64" tags: build_tools @@ -107,14 +105,12 @@ - role: adoptopenjdk_install # JDK17 Build Bootstrap jdk_version: 16 when: - - ansible_distribution != "Alpine" - ansible_distribution != "Solaris" - ansible_architecture != "riscv64" tags: build_tools - role: adoptopenjdk_install # JDK18 Build Bootstrap jdk_version: 17 when: - - ansible_distribution != "Alpine" - ansible_distribution != "Solaris" - ansible_architecture != "riscv64" tags: build_tools diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml index c6f25726c2..8af3369dad 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml @@ -28,7 +28,7 @@ when: ansible_architecture == "x86_64" block: - name: Check if zulu-7 is already installed in the target location - stat: path=/usr/lib/jvm/zulu7 + stat: path=/usr/lib/jvm/jdk-7 register: zulu7_installed tags: build_tools @@ -44,148 +44,72 @@ - name: Create symlink to point at zulu-7 file: src: /usr/lib/jvm/zulu7.52.0.11-ca-jdk7.0.332-linux_x64 - dest: /usr/lib/jvm/zulu7 + dest: /usr/lib/jvm/jdk-7 state: link when: - not zulu7_installed.stat.exists tags: build_tools - - name: Check if zulu-8 is already installed in the target location - stat: path=/usr/lib/jvm/zulu8 - register: zulu8_installed - tags: build_tools - - name: Install latest zulu-8 release if not already installed - unarchive: - src: https://cdn.azul.com/zulu/bin/zulu8.58.0.13-ca-jdk8.0.312-linux_musl_x64.tar.gz - dest: /usr/lib/jvm/ - remote_src: yes - when: - - not zulu8_installed.stat.exists - tags: build_tools - - - name: Create symlink to point at zulu-8 - file: - src: /usr/lib/jvm/zulu8.58.0.13-ca-jdk8.0.312-linux_musl_x64 - dest: /usr/lib/jvm/zulu8 - state: link - when: - - not zulu8_installed.stat.exists - tags: build_tools - - - name: Check if zulu-11 is already installed in the target location - stat: path=/usr/lib/jvm/zulu11 - register: zulu11_installed - tags: build_tools - - - name: Install latest zulu-11 release if not already installed - unarchive: - src: https://cdn.azul.com/zulu/bin/zulu11.54.25-ca-jdk11.0.14.1-linux_musl_x64.tar.gz - dest: /usr/lib/jvm/ - remote_src: yes - when: - - not zulu11_installed.stat.exists - tags: build_tools - - - name: Create symlink to point at zulu-11 - file: - src: /usr/lib/jvm/zulu11.54.25-ca-jdk11.0.14.1-linux_musl_x64 - dest: /usr/lib/jvm/zulu11 - state: link - when: - - not zulu11_installed.stat.exists - tags: build_tools - - - name: Check if zulu-14 is already installed in the target location - stat: path=/usr/lib/jvm/zulu14 - register: zulu14_installed - tags: build_tools - - - name: Install latest zulu-14 release if not already installed - unarchive: - src: https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-linux_musl_x64.tar.gz - dest: /usr/lib/jvm/ - remote_src: yes - when: - - not zulu14_installed.stat.exists - tags: build_tools - - - name: Create symlink to point at zulu-14 - file: - src: /usr/lib/jvm/zulu14.29.23-ca-jdk14.0.2-linux_musl_x64 - dest: /usr/lib/jvm/zulu14 - state: link - when: - - not zulu14_installed.stat.exists - tags: build_tools - - - name: Check if zulu-15 is already installed in the target location - stat: path=/usr/lib/jvm/zulu15 - register: zulu15_installed +- name: Install JDK for aarch64 + when: ansible_architecture == "aarch64" + block: + - name: Install java 8 from Alpine repositories + package: "name=openjdk8 state=installed" tags: build_tools - - name: Install latest zulu-15 release if not already installed - unarchive: - src: https://cdn.azul.com/zulu/bin/zulu15.38.17-ca-jdk15.0.6-linux_musl_x64.tar.gz - dest: /usr/lib/jvm/ - remote_src: yes - when: - - not zulu15_installed.stat.exists + # Using jdk-8 path name for compatibility with the build dockerfile + # ENV statements until we replace this with a Temurin 8 + - name: Check if jdk-8 symlink is in place (TEMPORARY) + stat: path=/usr/lib/jvm/jdk-8 + register: jdk8_installed tags: build_tools - - name: Create symlink to point at zulu-15 + - name: Create symlink to point at openjdk8 file: - src: /usr/lib/jvm/zulu15.38.17-ca-jdk15.0.6-linux_musl_x64 - dest: /usr/lib/jvm/zulu15 + src: /usr/lib/jvm/java-8-openjdk + dest: /usr/lib/jvm/jdk-8 state: link when: - - not zulu15_installed.stat.exists + - not jdk8_installed.stat.exists tags: build_tools -- name: Install JDK for aarch64 - when: ansible_architecture == "aarch64" - block: - - name: Install java 8 from Alpine repositories - package: "name=openjdk8 state=installed" - tags: build_tools - - # Using zulu8 path name for compatibility with the build dockerfile - # ENV statements until we replace this with a Temurin 8 - - name: Check if zulu 8 symlink is in place (TEMPORARY) - stat: path=/usr/lib/jvm/zulu8 - register: zulu8_installed + # Fudge as we don't have access to a JDK7 bootjdk for alpine + - name: Check if jdk-7 symlink is in place (TEMPORARY) + stat: path=/usr/lib/jvm/jdk-7 + register: jdk7_installed tags: build_tools - name: Create symlink to point at openjdk8 file: src: /usr/lib/jvm/java-8-openjdk - dest: /usr/lib/jvm/zulu8 + dest: /usr/lib/jvm/jdk-7 state: link when: - - not zulu8_installed.stat.exists + - not jdk7_installed.stat.exists tags: build_tools - name: Install java 11 from Alpine repositories package: "name=openjdk11 state=installed" tags: build_tools - # Using zulu11 path name for compatibility with the build dockerfile - # ENV statements until we replace this with a Temurin 8 - - name: Check if zulu 11 symlink is in place (TEMPORARY) - stat: path=/usr/lib/jvm/zulu11 - register: zulu11_installed + # Using jdk-11 path name for compatibility with the build dockerfile + # ENV statements until we replace this with a Temurin 11 + - name: Check if jdk-11 symlink is in place (TEMPORARY) + stat: path=/usr/lib/jvm/jdk-11 + register: jdk11_installed tags: build_tools - name: Create symlink to point at openjdk11 file: src: /usr/lib/jvm/java-11-openjdk - dest: /usr/lib/jvm/zulu11 + dest: /usr/lib/jvm/jdk-11 state: link when: - - not zulu8_installed.stat.exists + - not jdk11_installed.stat.exists tags: build_tools - name: Check if zulu-16 is already installed in the target location - stat: path=/usr/lib/jvm/zulu16 + stat: path=/usr/lib/jvm/jdk-16 register: zulu16_installed tags: build_tools @@ -201,54 +125,8 @@ - name: Create symlink to point at zulu-16 file: src: /usr/lib/jvm/zulu16.32.15-ca-jdk16.0.2-linux_musl_aarch64 - dest: /usr/lib/jvm/zulu16 + dest: /usr/lib/jvm/jdk-16 state: link when: - not zulu16_installed.stat.exists tags: build_tools - - - name: Check if zulu-17 is already installed in the target location - stat: path=/usr/lib/jvm/zulu17 - register: zulu17_installed - tags: build_tools - - - name: Install latest zulu-17 release if not already installed - unarchive: - src: https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_musl_aarch64.tar.gz - dest: /usr/lib/jvm/ - remote_src: yes - when: - - not zulu17_installed.stat.exists - tags: build_tools - - - name: Create symlink to point at zulu-17 - file: - src: /usr/lib/jvm/zulu17.32.13-ca-jdk17.0.2-linux_musl_aarch64 - dest: /usr/lib/jvm/zulu17 - state: link - when: - - not zulu17_installed.stat.exists - tags: build_tools - - - name: Check if zulu-18 is already installed in the target location - stat: path=/usr/lib/jvm/zulu18 - register: zulu18_installed - tags: build_tools - - - name: Install latest zulu-18 release if not already installed - unarchive: - src: https://cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-linux_musl_aarch64.tar.gz - dest: /usr/lib/jvm/ - remote_src: yes - when: - - not zulu18_installed.stat.exists - tags: build_tools - - - name: Create symlink to point at zulu-18 - file: - src: /usr/lib/jvm/zulu18.28.13-ca-jdk18.0.0-linux_musl_aarch64 - dest: /usr/lib/jvm/zulu18 - state: link - when: - - not zulu18_installed.stat.exists - tags: build_tools