-
-
Notifications
You must be signed in to change notification settings - Fork 101
/
main.yml
156 lines (155 loc) · 5.75 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
---
###################################
# AdoptOpenJDK - Ansible Playbook #
###################################
# Groups can be passed in as a command-line variable in Ansible playbook.
# It can be defined as 'all' or a specific group which the host belongs to.
# For example, it can be 'all' or 'x86' for when a host is in the group 'x86'.
- name: Ansible Unix playbook
hosts: "{{ Groups | default('localhost:build:test:perf:jck:!*zos*:!*win*:!*aix*') }}"
gather_facts: yes
tasks:
- name: Run Tasks
block:
# Set standard variables
- name: Load AdoptOpenJDKs variable file
include_vars: group_vars/all/adoptopenjdk_variables.yml
environment:
PATH: "/opt/csw/bin/:/usr/local/bin:/opt/homebrew/bin:{{ ansible_env.PATH }}"
#########
# Roles #
#########
roles:
- role: logs
position: "Start"
tags: always
- Debug
- role: Get_Vendor_Files
tags: [vendor_files, adoptopenjdk, jenkins_user, nagios_plugins, superuser]
- Version
- adopt_etc
- role: CentOS6-Cent7SSL
when: ((ansible_distribution == "RedHat" or ansible_distribution == "CentOS") and ansible_distribution_major_version == "6" and ansible_architecture == "x86_64")
- Common
- Python2.7 # CentOS6
- Providers # AdoptOpenJDK Infrastructure
- autoconf
- curl
- Jenkins_User # AdoptOpenJDK Infrastructure
# - role: freemarker # OpenJ9
# tags: [build_tools, build_tools_openj9]
- role: macos_codesign
tags: [adoptopenjdk, codesign]
when: ansible_distribution == "MacOSX"
- ant # Testing
- Ant-Contrib # Testing
- maven # Testing
- role: GIT_Source
when: ansible_distribution != "Solaris" # Compile fails on Solaris
- gmake
- Docker # Testing
- role: NVidia_Cuda_Toolkit # OpenJ9
tags: [build_tools, build_tools_openj9]
- Superuser # AdoptOpenJDK Infrastructure
- role: Swap_File
when:
- ansible_distribution != "MacOSX"
- ansible_distribution != "Solaris" # These steps fail on Solaris
tags: adoptopenjdk
- role: Crontab
when:
- ansible_distribution != "MacOSX"
tags: adoptopenjdk
- role: NTP_TIME
when: ansible_distribution != "MacOSX"
- gcc_48
- role: gcc_7 # OpenJ9
tags: [build_tools, build_tools_openj9]
- role: gcc_9 # Dragonwell
tags: [build_tools]
- role: gcc_10 # JDK17+
tags: [build_tools]
- role: gcc_11 # JDK19+
tags: [build_tools]
- role: devkit # JDK19+
devkit_version: gcc-11.3.0-Centos7.9.2009-b03
when:
- ansible_os_family == "RedHat" or ansible_os_family == "Debian"
- ansible_architecture == "x86_64" or ansible_architecture == "ppc64le"
tags: [devkit]
- role: devkit # JDK19+
devkit_version: gcc-11.3.0-Centos7.6.1810-b03
when:
- ansible_os_family == "RedHat" or ansible_os_family == "Debian"
- ansible_architecture == "aarch64"
tags: [devkit]
- role: Xcode11
when: ansible_distribution == "MacOSX" and ansible_architecture == "arm64"
tags: [xcode11] # JDK 8
- role: Xcode15
when: ansible_distribution == "MacOSX" and ansible_architecture == "arm64"
tags: [xcode15] # JDK 17+
- role: cmake # OpenJ9 / OpenJFX
when: ansible_distribution != "Solaris" # Compile fails on Solaris
tags: [build_tools, build_tools_openj9, build_tools_openjfx]
- role: capstone
tags: [build_tools]
- role: ccache
when: ansible_distribution != "Solaris" # Compile fails on Solaris
- role: nasm # OpenJ9
when: ansible_architecture == 'x86_64'
tags: [build_tools, build_tools_openj9]
- role: zulu7 # JDK8 Build Bootstrap
when: ansible_distribution != "MacOSX"
- role: adoptopenjdk_install
jdk_version: 8
when:
- (ansible_distribution != "Alpine" or ansible_architecture != "aarch64")
- ansible_architecture != "riscv64"
- ansible_architecture != "s390x"
tags: build_tools
- role: adoptopenjdk_install # JDK11 Build Bootstrap
jdk_version: 10
when:
- ansible_distribution != "Alpine"
- ansible_distribution != "Solaris"
- ansible_architecture != "riscv64"
tags: build_tools
- role: adoptopenjdk_install # JDK11 is LTS and likely still relied on by some agents
jdk_version: 11
when:
- (ansible_distribution != "Alpine" or ansible_architecture != "aarch64")
- ansible_distribution != "Solaris"
tags: build_tools
- role: adoptopenjdk_install # Previous LTS
jdk_version: 17
when:
- ansible_distribution != "Solaris"
tags: build_tools
- role: adoptopenjdk_install # JDK21 Build Bootstrap
jdk_version: 20
when:
- ansible_distribution != "Alpine"
- ansible_distribution != "Solaris"
- ansible_architecture != "riscv64"
- ansible_architecture != "armv7l"
- ansible_architecture != "s390x"
tags: build_tools
- role: adoptopenjdk_install # Current LTS
jdk_version: 21
when:
- ansible_distribution != "Solaris"
- ansible_architecture != "armv7l"
tags: build_tools
- role: Nagios_Plugins # AdoptOpenJDK Infrastructure
tags: [nagios_plugins, adoptopenjdk]
- riscv_cross_compiler # For building JDK11/J9 on RISC-V architecture
- Clean_Up
- Security
- Vendor
- IPv6
- role: disable_gui
tags: adoptopenjdk
- role: logs
position: "End"
tags: always