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: switch alpine builds to use temurin boot jdk where possible #2568

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 8 additions & 12 deletions ansible/docker/Dockerfile.Alpine3
Expand Up @@ -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" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one going to be pointing anywhere useful? I'd be tempted to hold off a bit on these changes until we've verified they work properly. I get the impression the JDK11 in particular may be causing the hangs on the test jobs as some of the later versions don't seem to be freezing so much at the moment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I switched the Zulu 7 build to be installed there for now

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"
4 changes: 0 additions & 4 deletions ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
Expand Up @@ -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
Expand All @@ -93,7 +92,6 @@
- role: adoptopenjdk_install
jdk_version: 11
when:
- ansible_distribution != "Alpine"
- ansible_distribution != "Solaris"
- ansible_architecture != "riscv64"
tags: build_tools
Expand All @@ -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
Expand Down
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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