Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/buildenv/ansible/roles/openj9-from-sources/tasks/main.yml
13461 views
1
###############################################################################
2
# Copyright (c) 2018, 2018 Pavel Samolysov
3
#
4
# This program and the accompanying materials are made available under
5
# the terms of the Eclipse Public License 2.0 which accompanies this
6
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
# or the Apache License, Version 2.0 which accompanies this distribution and
8
# is available at https://www.apache.org/licenses/LICENSE-2.0.
9
#
10
# This Source Code may also be made available under the following
11
# Secondary Licenses when the conditions for such availability set
12
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
# General Public License, version 2 with the GNU Classpath
14
# Exception [1] and GNU General Public License, version 2 with the
15
# OpenJDK Assembly Exception [2].
16
#
17
# [1] https://www.gnu.org/software/classpath/license.html
18
# [2] http://openjdk.java.net/legal/assembly-exception.html
19
#
20
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
###############################################################################
22
---
23
- name: Checkout ibmruntimes
24
delegate_to: "openj9-{{ version }}-build"
25
git:
26
repo: "https://github.com/ibmruntimes/openj9-openjdk-{{ version }}"
27
dest: "/root/openj9-openjdk-{{ version }}"
28
version: openj9
29
update: yes
30
force: yes
31
accept_hostkey: yes
32
tags:
33
- build
34
- name: Set get_source.sh as executable
35
delegate_to: "openj9-{{ version }}-build"
36
file:
37
path: "/root/openj9-openjdk-{{ version }}/get_source.sh"
38
mode: 0755
39
tags:
40
- build
41
- name: Get the sources
42
delegate_to: "openj9-{{ version }}-build"
43
shell: "/root/openj9-openjdk-{{ version }}/get_source.sh"
44
args:
45
chdir: "/root/openj9-openjdk-{{ version }}"
46
tags:
47
- build
48
- name: Set configure as executable
49
delegate_to: "openj9-{{ version }}-build"
50
file:
51
path: "/root/openj9-openjdk-{{ version }}/configure"
52
mode: 0755
53
tags:
54
- build
55
- name: Configure
56
delegate_to: "openj9-{{ version }}-build"
57
shell: "/root/openj9-openjdk-{{ version }}/configure --with-freemarker-jar=/root/freemarker.jar"
58
args:
59
chdir: "/root/openj9-openjdk-{{ version }}"
60
tags:
61
- build
62
- compile
63
- name: Make clean
64
delegate_to: "openj9-{{ version }}-build"
65
shell: "make clean"
66
args:
67
chdir: "/root/openj9-openjdk-{{ version }}"
68
when: not build.cleanup
69
tags:
70
- build
71
- compile
72
- name: Make all
73
delegate_to: "openj9-{{ version }}-build"
74
shell: "make all"
75
args:
76
chdir: "/root/openj9-openjdk-{{ version }}"
77
tags:
78
- build
79
- compile
80
- name: Check if j2sdk-image exists
81
stat:
82
path: "/root/openj9-openjdk-{{ version }}/build/{{ os }}-{{ platform }}-normal-server-release/images/j2sdk-image"
83
register: j2sdk
84
delegate_to: "openj9-{{ version }}-build"
85
tags:
86
- build
87
- name: Create symlink j2sdk to jdk
88
file:
89
src: "/root/openj9-openjdk-{{ version }}/build/{{ os }}-{{ platform }}-normal-server-release/images/jdk"
90
dest: "/root/openj9-openjdk-{{ version }}/build/{{ os }}-{{ platform }}-normal-server-release/images/j2sdk-image"
91
state: link
92
when: not j2sdk.stat.exists
93
delegate_to: "openj9-{{ version }}-build"
94
tags:
95
- build
96
- name: Change the owner of the built JDK
97
file:
98
path: "/root/openj9-openjdk-{{ version }}/build/{{ os }}-{{ platform }}-normal-server-release/images/j2sdk-image/"
99
recurse: yes
100
owner: "{{ target.user }}"
101
group: "{{ target.group }}"
102
delegate_to: "openj9-{{ version }}-build"
103
tags:
104
- build
105
- name: Remove the previous version of the JDK archive
106
file:
107
path: "/root/hostdir/openj9-{{ version }}-{{ os }}-{{ platform }}.tar.gz"
108
state: absent
109
delegate_to: "openj9-{{ version }}-build"
110
tags:
111
- build
112
- name: Archive the JDK
113
archive:
114
path: "/root/openj9-openjdk-{{ version }}/build/{{ os }}-{{ platform }}-normal-server-release/images/j2sdk-image/*"
115
dest: "/root/hostdir/openj9-{{ version }}-{{ os }}-{{ platform }}.tar.gz"
116
mode: 0644
117
owner: "{{ ansible_user.stdout }}"
118
group: "{{ ansible_group.stdout }}"
119
delegate_to: "openj9-{{ version }}-build"
120
tags:
121
- build
122
123