Skip to content

Commit

Permalink
Merge branch 'master' into rhel9-conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
AswathySK authored Nov 11, 2024
2 parents 7766922 + afb0e11 commit d93844c
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 49 deletions.
6 changes: 3 additions & 3 deletions ansible/docker/Dockerfile.Alpine3
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ RUN set -eux; \
ENV \
JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK8_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk11" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \
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/jdk-17" \
JDK17_BOOT_DIR="/usr/lib/jvm/jdk17" \
JDK18_BOOT_DIR="/usr/lib/jvm/zulu18" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/zulu18" \
JAVA_HOME="/usr/lib/jvm/jdk8"
10 changes: 5 additions & 5 deletions ansible/docker/Dockerfile.CentOS6
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user}
ENV \
JDK7_BOOT_DIR="/usr/lib/jvm/java-1.7.0-openjdk.x86_64" \
JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk.x86_64" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk.x86_64"
10 changes: 5 additions & 5 deletions ansible/docker/Dockerfile.CentOS7
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user}
ENV \
JDK7_BOOT_DIR="/usr/lib/jvm/java-1.7.0-openjdk" \
JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
10 changes: 5 additions & 5 deletions ansible/docker/Dockerfile.Ubuntu1604
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ RUN mv /bin/uname /bin/uname.real && echo "/bin/uname.real \$@ | sed 's/aarch64/
ENV \
JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK8_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
10 changes: 5 additions & 5 deletions ansible/docker/Dockerfile.Ubuntu2004-riscv64
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN groupadd -g 1000 ${user}
RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user}

ENV \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK17_BOOT_DIR="/usr/lib/jvm/jdk-17" \
JDK19_BOOT_DIR="/usr/lib/jvm/jdk-19" \
JDK21_BOOT_DIR="/usr/lib/jvm/jdk-21" \
JAVA_HOME="/usr/lib/jvm/jdk-11"
JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \
JDK17_BOOT_DIR="/usr/lib/jvm/jdk17" \
JDK19_BOOT_DIR="/usr/lib/jvm/jdk19" \
JDK21_BOOT_DIR="/usr/lib/jvm/jdk21" \
JAVA_HOME="/usr/lib/jvm/jdk11"
10 changes: 5 additions & 5 deletions ansible/docker/Dockerfile.Ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user}
ENV \
JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK8_BOOT_DIR="/usr/lib/jvm/jdk8" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \
JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \
JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \
JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \
JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \
JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
4 changes: 0 additions & 4 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ hosts:
- digitalocean:
ubuntu2004-x64-1: {ip: 178.62.115.224, description: bastillion.adoptopenjdk.net}

- equinix:
ubuntu1604-x64-1: {ip: 147.75.80.219, description: ansible.adoptopenjdk.net}
ubuntu2004-x64-1: {ip: 147.75.80.235, description: awx.adoptopenjdk.net}

- hetzner:
ubuntu1604-x64-1: {ip: 78.47.239.96, description: nagios.adoptopenjdk.net}
ubuntu2004-x64-1: {ip: 78.47.239.97, description: ci.adoptium.net}
Expand Down
1 change: 1 addition & 0 deletions ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
jdk_version: 17
when:
- ansible_distribution != "Solaris"
- not (ansible_distribution == "Alpine" and ansible_architecture == "aarch64")
tags: build_tools
- role: adoptopenjdk_install # JDK21 Build Bootstrap
jdk_version: 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@

- name: Set path variable when jdk_version != 8
set_fact:
path: /usr/lib/jvm/jdk-{{ jdk_version }}
path: /usr/lib/jvm/jdk{{ jdk_version }}
when:
- jdk_version != 8
- ansible_distribution != "MacOSX"
tags: adoptopenjdk_install

- name: Set path variable (macOS)
set_fact:
path: "/Library/Java/JavaVirtualMachines/jdk-{{ jdk_version }}"
path: "/Library/Java/JavaVirtualMachines/jdk{{ jdk_version }}"
when: ansible_distribution == "MacOSX"
tags: adoptopenjdk_install

Expand Down Expand Up @@ -136,7 +136,7 @@
- not usr_lib_jvm_exists.stat.exists
tags: adoptopenjdk_install

- name: Check if jdk-{{ jdk_version }} is already installed in the target location
- name: Check if jdk{{ jdk_version }} is already installed in the target location
shell: ls -ld {{ path }} >/dev/null 2>&1
failed_when: false
register: adoptopenjdk_installed
Expand Down Expand Up @@ -356,17 +356,21 @@
until: adoptopenjdk_unpack is not failed

- name: Get {{ path }}* full path name
shell: set -o pipefail | ls -ld {{ path }}* 2>/dev/null | awk '{print $9}'
register: adoptopenjdk_dir
changed_when: false
find:
paths: /usr/lib/jvm
patterns:
- "^jdk{{ jdk_version }}*"
- "^jdk-{{ jdk_version }}.*"
use_regex: yes
file_type: directory
when:
- ansible_distribution != "MacOSX"
- adoptopenjdk_installed.rc != 0
tags: adoptopenjdk_install
register: adoptopenjdk_dir

- name: Create symlink to major version
file:
src: '{{ adoptopenjdk_dir.stdout }}'
src: '{{ adoptopenjdk_dir.files[0].path }}'
dest: '{{ path }}'
state: link
when:
Expand All @@ -376,7 +380,7 @@

- name: Chown {{ path }}*
file:
path: '{{ adoptopenjdk_dir.stdout }}'
path: '{{ adoptopenjdk_dir.files[0].path }}'
state: directory
owner: root
recurse: yes
Expand Down

0 comments on commit d93844c

Please sign in to comment.