From 00aecbd83f55e43e6c40a2d49c76e561d8819332 Mon Sep 17 00:00:00 2001 From: Haroon Khel <34969545+Haroon-Khel@users.noreply.github.com> Date: Fri, 8 Nov 2024 19:30:57 +0800 Subject: [PATCH] unixPB: Dont install GA JDK17 bootjdk on alpine aarch64 (#3805) * unixPB: Dont install alpine aarch64 JDK17 bootjdk * Remove hyphens from symlinks in bootjdks installed from Common role * typo --- .../AdoptOpenJDK_Unix_Playbook/main.yml | 1 + .../roles/Common/tasks/Alpine.yml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml index 06073ba261..94b9424d37 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml @@ -126,6 +126,7 @@ jdk_version: 17 when: - ansible_distribution != "Solaris" + - (ansible_distribution != "Alpine" and ansible_architecture != "aarch64") tags: build_tools - role: adoptopenjdk_install # JDK21 Build Bootstrap jdk_version: 20 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 5bcfd453af..3ca25d603f 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml @@ -137,10 +137,10 @@ when: - not adoptopenjdk8_installed.stat.exists -# Temp: install a non temurin binary until GA or when the jdk-11 alpine aarch64 build job becomes more stable (whichever comes first) +# Temp: install a non temurin binary until GA or when the jdk11 alpine aarch64 build job becomes more stable (whichever comes first) # https://github.com/adoptium/temurin-build/issues/2961 - - name: Check if jdk-11 is already installed in the target location - stat: path=/usr/lib/jvm/jdk-11 + - name: Check if jdk11 is already installed in the target location + stat: path=/usr/lib/jvm/jdk11 register: adoptopenjdk11_installed - name: Install java 11 from Alpine repositories @@ -150,7 +150,7 @@ - name: Create symlink to point at openjdk11 file: src: /usr/lib/jvm/java-11-openjdk - dest: /usr/lib/jvm/jdk-11 + dest: /usr/lib/jvm/jdk11 state: link when: ansible_architecture != "aarch64" and not adoptopenjdk11_installed.stat.exists @@ -177,10 +177,10 @@ # Temp. Change to GA binary once theyre available - name: Check if Temurin jdk17 is installed stat: - path: /usr/lib/jvm/jdk-17 + path: /usr/lib/jvm/jdk17 register: adoptopenjdk17_installed - - name: Install Temurin jdk-17 nightly + - name: Install Temurin jdk17 nightly unarchive: src: https://github.com/adoptium/temurin17-binaries/releases/download/jdk17u-2022-05-27-19-32-beta/OpenJDK17U-jdk_aarch64_alpine-linux_hotspot_2022-05-27-17-01.tar.gz dest: /usr/lib/jvm @@ -192,7 +192,7 @@ when: - not adoptopenjdk17_installed.stat.exists - - name: Get Temurin jdk-17 full path name + - name: Get Temurin jdk17 full path name shell: set -o pipefail | ls -ld /usr/lib/jvm/jdk-17.* 2>/dev/null | awk '{print $9}' register: adoptopenjdk17_dir when: @@ -201,7 +201,7 @@ - name: Create symlink to major version file: src: '{{ adoptopenjdk17_dir.stdout }}' - dest: /usr/lib/jvm/jdk-17 + dest: /usr/lib/jvm/jdk17 state: link when: - not adoptopenjdk17_installed.stat.exists