forked from adoptium/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unixPB: add openjdk devkit installs for Linux on x64, ppc64le, aarch64 (
adoptium#3488) * unixPB: add adoptium openjdk devkit install Signed-off-by: Stewart X Addison <sxa@redhat.com> * Remove trailing space Signed-off-by: Stewart X Addison <sxa@redhat.com> * fixup Signed-off-by: Stewart X Addison <sxa@redhat.com> * Adjust filenames/directory layout for new changes to devkit jobs Signed-off-by: Stewart X Addison <sxa@redhat.com> * Add -gnu suffix to devkit filename * Revert "Adjust filenames/directory layout for new changes to devkit jobs" This reverts commit e6c4f45. * Update devkit to b02 Signed-off-by: Stewart X Addison <sxa@redhat.com> * Use different devkit for aarch64 Signed-off-by: Stewart X Addison <sxa@redhat.com> * Add checksums for b02 devkits Signed-off-by: Stewart X Addison <sxa@redhat.com> --------- Signed-off-by: Stewart X Addison <sxa@redhat.com>
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
################################ | ||
# Adoptium devkit installation # | ||
################################ | ||
|
||
- name: Check if devkit {{ devkit_version }} is installed | ||
shell: /usr/local/devkit/{{ devkit_version }}/bin/gcc --version 2>&1 > /dev/null | ||
failed_when: false | ||
register: devkit_installed | ||
changed_when: False | ||
tags: devkit | ||
|
||
- name: Set filename of devkit tarball | ||
set_fact: | ||
devkit_filename: devkit-{{ devkit_version }}-{{ ansible_architecture }}-linux-gnu.tar.xz | ||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit | ||
|
||
- name: Download {{ devkit_filename }} | ||
get_url: | ||
url: https://github.com/adoptium/devkit-binaries/releases/download/{{ devkit_version }}/{{ devkit_filename }} | ||
dest: /tmp/devkit.tar.xz | ||
force: no | ||
mode: 0644 | ||
checksum: "sha256:{{ lookup('vars', 'csum_' + ansible_architecture) }}" | ||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit | ||
|
||
# Perhaps this should have the `b01` removed ... Or use a symlink? | ||
- name: Create /usr/local/devkit/{{ devkit_version }} | ||
file: | ||
path: /usr/local/devkit/{{ devkit_version }} | ||
state: directory | ||
mode: '0755' | ||
|
||
- name: Extract {{ devkit_filename }} to /usr/local/devkit | ||
unarchive: | ||
src: /tmp/devkit.tar.xz | ||
dest: /usr/local/devkit/{{ devkit_version }} | ||
copy: False | ||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit | ||
|
||
- name: Remove tarball | ||
file: | ||
path: '/tmp/devkit.tar.xz' | ||
state: absent | ||
when: | ||
- devkit_installed.rc != 0 | ||
tags: devkit |
4 changes: 4 additions & 0 deletions
4
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/devkit/vars/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
csum_x86_64: 8546406f0260ea6b2e136af13c3ea2d70d20f3d7c5935914f2f73b458141f231 | ||
csum_aarch64: ac1bbbbbe28b753f865fa96dc48ac950f311c78304d03b05b234c8e16828c517 | ||
csum_ppc64le: 5f4a9a3ea8c0c3d78800df805a64523ba3415fd68b6906c56ed9dacd1d0d5c1b |