author | erikj |
Thu, 30 Mar 2017 10:37:19 +0200 | |
changeset 44399 | aa6d8068ec21 |
parent 43919 | 74a204b70355 |
child 44466 | 5b09914e1c28 |
child 44513 | 1cf28405432d |
permissions | -rw-r--r-- |
34491 | 1 |
/* |
41458 | 2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
34491 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
/* |
|
34496 | 27 |
* This file defines build profiles for the JIB tool and others. |
34491 | 28 |
* |
29 |
* A build profile defines a set of configuration options and external |
|
30 |
* dependencies that we for some reason or other care about specifically. |
|
31 |
* Typically, build profiles are defined for the build configurations we |
|
32 |
* build regularly. |
|
33 |
* |
|
34 |
* Contract against this file from the tools that use it, is to provide |
|
35 |
* a function on the form: |
|
36 |
* |
|
34496 | 37 |
* getJibProfiles(input) |
34491 | 38 |
* |
39 |
* which returns an object graph describing the profiles and their |
|
40 |
* dependencies. The name of the function is based on the name of this |
|
41 |
* file, minus the extension and the '-', camel cased and prefixed with |
|
42 |
* 'get'. |
|
43 |
* |
|
44 |
* |
|
45 |
* The parameter 'input' is an object that optionally contains some data. |
|
46 |
* Optionally because a tool may read the configuration for different purposes. |
|
47 |
* To initially get a list of available profiles, the active profile may not |
|
48 |
* yet be known for instance. |
|
49 |
* |
|
50 |
* Data that may be set on the input object: |
|
51 |
* |
|
52 |
* input.profile = <name of active profile> |
|
53 |
* |
|
54 |
* If the active profile is set, the following data from it must also |
|
55 |
* be provided: |
|
56 |
* |
|
57 |
* input.profile |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
58 |
* input.build_id |
34491 | 59 |
* input.target_os |
60 |
* input.target_cpu |
|
61 |
* input.build_os |
|
62 |
* input.build_cpu |
|
63 |
* input.target_platform |
|
64 |
* input.build_platform |
|
65 |
* // The build_osenv_* variables describe the unix layer on Windows systems, |
|
66 |
* // i.e. Cygwin, which may also be 32 or 64 bit. |
|
67 |
* input.build_osenv |
|
68 |
* input.build_osenv_cpu |
|
69 |
* input.build_osenv_platform |
|
70 |
* |
|
71 |
* For more complex nested attributes, there is a method "get": |
|
72 |
* |
|
73 |
* input.get("<dependency>", "<attribute>") |
|
74 |
* |
|
75 |
* Valid attributes are: |
|
76 |
* install_path |
|
77 |
* download_path |
|
78 |
* download_dir |
|
79 |
* |
|
80 |
* |
|
81 |
* The output data generated by this configuration file has the following |
|
82 |
* format: |
|
83 |
* |
|
84 |
* data: { |
|
85 |
* // Identifies the version of this format to the tool reading it |
|
86 |
* format_version: "1.0", |
|
87 |
* |
|
34496 | 88 |
* // Name of base outputdir. JIB assumes the actual output dir is formed |
34491 | 89 |
* // by adding the configuration name: <output_basedir>/<config-name> |
90 |
* output_basedir: "build", |
|
91 |
* // Configure argument to use to specify configuration name |
|
92 |
* configuration_configure_arg: |
|
93 |
* // Make argument to use to specify configuration name |
|
94 |
* configuration_make_arg: |
|
95 |
* |
|
96 |
* profiles: { |
|
97 |
* <profile-name>: { |
|
98 |
* // Name of os the profile is built to run on |
|
99 |
* target_os; <string> |
|
100 |
* // Name of cpu the profile is built to run on |
|
101 |
* target_cpu; <string> |
|
102 |
* // Combination of target_os and target_cpu for convenience |
|
103 |
* target_platform; <string> |
|
104 |
* // Name of os the profile is built on |
|
105 |
* build_os; <string> |
|
106 |
* // Name of cpu the profile is built on |
|
107 |
* build_cpu; <string> |
|
108 |
* // Combination of build_os and build_cpu for convenience |
|
109 |
* build_platform; <string> |
|
110 |
* |
|
111 |
* // List of dependencies needed to build this profile |
|
112 |
* dependencies: <Array of strings> |
|
113 |
* |
|
114 |
* // List of configure args to use for this profile |
|
115 |
* configure_args: <Array of strings> |
|
116 |
* |
|
117 |
* // List of free form labels describing aspects of this profile |
|
118 |
* labels: <Array of strings> |
|
119 |
* } |
|
120 |
* } |
|
121 |
* |
|
122 |
* // Dependencies use a Maven like deployment structure |
|
123 |
* dependencies: { |
|
124 |
* <dependency-name>: { |
|
125 |
* // Organization part of path defining this dependency |
|
126 |
* organization: <string> |
|
127 |
* // File extension for this dependency |
|
128 |
* ext: <string> |
|
129 |
* // Module part of path for defining this dependency, |
|
130 |
* // defaults to <dependency-name> |
|
131 |
* module: <string> |
|
132 |
* // Revision part of path for defining this dependency |
|
133 |
* revision: <string> |
|
134 |
* |
|
135 |
* // List of configure args to add when using this dependency, |
|
136 |
* // defaults to |
|
137 |
* // "--with-<dependency-name>=input.get("<dependency-name", "install_path")" |
|
138 |
* configure_args: <array of strings> |
|
139 |
* |
|
140 |
* // Name of environment variable to set when using this dependency |
|
141 |
* // when running make |
|
142 |
* environment_name: <string> |
|
143 |
* // Value of environment variable to set when using this dependency |
|
144 |
* // when running make |
|
145 |
* environment_value: <string> |
|
146 |
* |
|
147 |
* // Value to add to the PATH variable when using this dependency, |
|
148 |
* // applies to both make and configure |
|
149 |
* environment_path: <string> |
|
150 |
* } |
|
151 |
* |
|
152 |
* <dependency-name>: { |
|
153 |
* // For certain dependencies where a legacy distribution mechanism is |
|
154 |
* // already in place, the "javare" server layout is also supported |
|
155 |
* // Indicate that an alternate server source and layout should be used |
|
156 |
* server: "javare" |
|
157 |
* |
|
158 |
* // For "javare", a combination of module, revision, |
|
159 |
* // build number (optional), files and checksum file is possible for |
|
160 |
* // artifacts following the standard layout. |
|
161 |
* module: <string> |
|
162 |
* revision: <string> |
|
163 |
* build_number: <string> |
|
164 |
* checksum_file: <string> |
|
165 |
* file: <string> |
|
166 |
* |
|
167 |
* // For other files, use checksum path and path instead |
|
168 |
* checksum_path: <string> |
|
169 |
* path: <string> |
|
170 |
* } |
|
171 |
* } |
|
172 |
* } |
|
173 |
*/ |
|
174 |
||
175 |
/** |
|
176 |
* Main entry to generate the profile configuration |
|
177 |
* |
|
178 |
* @param input External data to use for generating the configuration |
|
179 |
* @returns {{}} Profile configuration |
|
180 |
*/ |
|
34496 | 181 |
var getJibProfiles = function (input) { |
34491 | 182 |
|
183 |
var data = {}; |
|
184 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
185 |
// Identifies the version of this format to the tool reading it. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
186 |
// 1.1 signifies that the publish, publish-src and get-src features are usable. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
187 |
data.format_version = "1.1"; |
34491 | 188 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
189 |
// Organization, product and version are used when uploading/publishing build results |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
190 |
data.organization = ""; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
191 |
data.product = "jdk"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
192 |
data.version = getVersion(); |
34491 | 193 |
|
34496 | 194 |
// The base directory for the build output. JIB will assume that the |
34491 | 195 |
// actual build directory will be <output_basedir>/<configuration> |
196 |
data.output_basedir = "build"; |
|
197 |
// The configure argument to use to specify the name of the configuration |
|
198 |
data.configuration_configure_arg = "--with-conf-name="; |
|
199 |
// The make argument to use to specify the name of the configuration |
|
200 |
data.configuration_make_arg = "CONF_NAME="; |
|
201 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
202 |
// Exclude list to use when Jib creates a source bundle |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
203 |
data.src_bundle_excludes = "./build webrev .hg */.hg */*/.hg */*/*/.hg"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
204 |
// Include list to use when creating a minimal jib source bundle which |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
205 |
// contains just the jib configuration files. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
206 |
data.conf_bundle_includes = "*/conf/jib-profiles.* common/autoconf/version-numbers" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
207 |
|
34491 | 208 |
// Define some common values |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
209 |
var common = getJibProfilesCommon(input, data); |
34491 | 210 |
// Generate the profiles part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
211 |
data.profiles = getJibProfilesProfiles(input, common, data); |
34491 | 212 |
// Generate the dependencies part of the configuration |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
213 |
data.dependencies = getJibProfilesDependencies(input, common, data); |
34491 | 214 |
|
215 |
return data; |
|
216 |
}; |
|
217 |
||
218 |
/** |
|
219 |
* Generates some common values |
|
220 |
* |
|
221 |
* @param input External data to use for generating the configuration |
|
222 |
* @returns Common values |
|
223 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
224 |
var getJibProfilesCommon = function (input, data) { |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
225 |
var common = {}; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
226 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
227 |
common.organization = "jpg.infra.builddeps"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
228 |
common.build_id = getBuildId(input); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
229 |
common.build_number = input.build_number != null ? input.build_number : "0"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
230 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
231 |
// List of the main profile names used for iteration |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
232 |
common.main_profile_names = [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
233 |
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
234 |
"solaris-sparcv9", "windows-x64", "windows-x86" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
235 |
]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
236 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
237 |
// These are the base setttings for all the main build profiles. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
238 |
common.main_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
239 |
dependencies: ["boot_jdk", "gnumake", "jtreg"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
240 |
default_make_targets: ["product-bundles", "test-bundles"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
241 |
configure_args: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
242 |
"--with-version-opt=" + common.build_id, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
243 |
"--enable-jtreg-failure-handler", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
244 |
"--with-version-build=" + common.build_number |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
245 |
] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
246 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
247 |
// Extra settings for debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
248 |
common.debug_suffix = "-debug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
249 |
common.debug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
250 |
configure_args: ["--enable-debug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
251 |
labels: "debug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
252 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
253 |
// Extra settings for slowdebug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
254 |
common.slowdebug_suffix = "-slowdebug"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
255 |
common.slowdebug_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
256 |
configure_args: ["--with-debug-level=slowdebug"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
257 |
labels: "slowdebug" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
258 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
259 |
// Extra settings for openjdk only profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
260 |
common.open_suffix = "-open"; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
261 |
common.open_profile_base = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
262 |
configure_args: ["--enable-openjdk-only"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
263 |
labels: "open" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
264 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
265 |
|
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
266 |
common.configure_args_64bit = ["--with-target-bits=64"]; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
267 |
common.configure_args_32bit = ["--with-target-bits=32"]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
268 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
269 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
270 |
* Define common artifacts template for all main profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
271 |
* @param pf - Name of platform in bundle names |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
272 |
* @param demo_ext - Type of extension for demo bundle |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
273 |
*/ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
274 |
common.main_profile_artifacts = function (pf, demo_ext) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
275 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
276 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
277 |
jdk: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
278 |
local: "bundles/\\(jdk.*bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
279 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
280 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
281 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
282 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
283 |
subdir: "jdk-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
284 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
285 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
286 |
jre: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
287 |
local: "bundles/\\(jre.*bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
288 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
289 |
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
290 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
291 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
292 |
subdir: "jre-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
293 |
exploded: "images/jre" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
294 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
295 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
296 |
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
297 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
298 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
299 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
300 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
301 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
302 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
303 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
304 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
305 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
306 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
307 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
308 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
309 |
subdir: "jdk-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
310 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
311 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
312 |
jre_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
313 |
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
314 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
315 |
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
316 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
317 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
318 |
subdir: "jre-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
319 |
exploded: "images/jre" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
320 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
321 |
demo: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
322 |
local: "bundles/\\(jdk.*demo." + demo_ext + "\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
323 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
324 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_demo." + demo_ext, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
325 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
326 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
327 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
328 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
329 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
330 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
331 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
332 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
333 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
334 |
* Define common artifacts template for all debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
335 |
* @param pf - Name of platform in bundle names |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
336 |
*/ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
337 |
common.debug_profile_artifacts = function (pf) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
338 |
return { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
339 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
340 |
jdk: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
341 |
local: "bundles/\\(jdk.*bin-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
342 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
343 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
344 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
345 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
346 |
subdir: "jdk-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
347 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
348 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
349 |
jre: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
350 |
local: "bundles/\\(jre.*bin-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
351 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
352 |
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
353 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
354 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
355 |
subdir: "jre-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
356 |
exploded: "images/jre" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
357 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
358 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
359 |
local: "bundles/\\(jdk.*bin-tests-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
360 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
361 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-debug.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
362 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
363 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
364 |
exploded: "images/test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
365 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
366 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
367 |
local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
368 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
369 |
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
370 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
371 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
372 |
subdir: "jdk-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
373 |
exploded: "images/jdk" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
374 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
375 |
jre_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
376 |
local: "bundles/\\(jre.*bin-debug-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
377 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
378 |
"bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
379 |
"bundles/" + pf + "/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
380 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
381 |
subdir: "jre-" + data.version, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
382 |
exploded: "images/jre" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
383 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
384 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
385 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
386 |
}; |
34491 | 387 |
|
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
388 |
var boot_jdk_revision = "8"; |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
389 |
var boot_jdk_subdirpart = "1.8.0"; |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
390 |
// JDK 8 does not work on sparc M7 cpus, need a newer update when building |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
391 |
// on such hardware. |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
392 |
if (input.build_cpu == "sparcv9") { |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
393 |
var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\""); |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
394 |
if (cpu_brand.trim() == 'SPARC-M7') { |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
395 |
boot_jdk_revision = "8u20"; |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
396 |
boot_jdk_subdirpart = "1.8.0_20"; |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
397 |
} |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
398 |
} |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
399 |
common.boot_jdk_revision = boot_jdk_revision; |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
400 |
common.boot_jdk_subdirpart = boot_jdk_subdirpart; |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
401 |
common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk" |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
402 |
+ common.boot_jdk_subdirpart |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
403 |
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : ""); |
43919 | 404 |
common.boot_jdk_platform = input.build_os + "-" |
405 |
+ (input.build_cpu == "x86" ? "i586" : input.build_cpu); |
|
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
406 |
|
34491 | 407 |
return common; |
408 |
}; |
|
409 |
||
410 |
/** |
|
411 |
* Generates the profiles part of the configuration. |
|
412 |
* |
|
413 |
* @param input External data to use for generating the configuration |
|
414 |
* @param common The common values |
|
415 |
* @returns {{}} Profiles part of the configuration |
|
416 |
*/ |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
417 |
var getJibProfilesProfiles = function (input, common, data) { |
34491 | 418 |
// Main SE profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
419 |
var profiles = { |
34491 | 420 |
|
421 |
"linux-x64": { |
|
422 |
target_os: "linux", |
|
423 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
424 |
dependencies: ["devkit"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
425 |
configure_args: concat(common.configure_args_64bit, "--with-zlib=system"), |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
426 |
default_make_targets: ["docs-bundles"], |
34491 | 427 |
}, |
428 |
||
429 |
"linux-x86": { |
|
430 |
target_os: "linux", |
|
431 |
target_cpu: "x86", |
|
432 |
build_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
433 |
dependencies: ["devkit"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
434 |
configure_args: concat(common.configure_args_32bit, |
39190
a6b5b18fd06c
8154209: Remove client VM from default JIB profile on windows-x86 and linux-x86
lmesnik
parents:
37972
diff
changeset
|
435 |
"--with-jvm-variants=minimal,server", "--with-zlib=system"), |
34491 | 436 |
}, |
437 |
||
438 |
"macosx-x64": { |
|
439 |
target_os: "macosx", |
|
440 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
441 |
dependencies: ["devkit"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
442 |
configure_args: concat(common.configure_args_64bit, "--with-zlib=system"), |
34491 | 443 |
}, |
444 |
||
445 |
"solaris-x64": { |
|
446 |
target_os: "solaris", |
|
447 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
448 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
449 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
450 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 451 |
}, |
452 |
||
453 |
"solaris-sparcv9": { |
|
454 |
target_os: "solaris", |
|
455 |
target_cpu: "sparcv9", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
456 |
dependencies: ["devkit", "cups"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
457 |
configure_args: concat(common.configure_args_64bit, |
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
458 |
"--with-zlib=system", "--enable-dtrace"), |
34491 | 459 |
}, |
460 |
||
461 |
"windows-x64": { |
|
462 |
target_os: "windows", |
|
463 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
464 |
dependencies: ["devkit", "freetype"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
465 |
configure_args: concat(common.configure_args_64bit), |
34491 | 466 |
}, |
467 |
||
468 |
"windows-x86": { |
|
469 |
target_os: "windows", |
|
470 |
target_cpu: "x86", |
|
471 |
build_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
472 |
dependencies: ["devkit", "freetype"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
473 |
configure_args: concat(common.configure_args_32bit), |
34491 | 474 |
} |
475 |
}; |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
476 |
// Add the base settings to all the main profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
477 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
478 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
479 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
480 |
|
34491 | 481 |
// Generate debug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
482 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
483 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
484 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
485 |
common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
486 |
}); |
36532 | 487 |
// Generate slowdebug versions of all the main profiles |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
488 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
489 |
var debugName = name + common.slowdebug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
490 |
profiles[debugName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
491 |
common.slowdebug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
492 |
}); |
34491 | 493 |
|
36532 | 494 |
// Generate open only profiles for all the main profiles for JPRT and reference |
495 |
// implementation builds. |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
496 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
497 |
var openName = name + common.open_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
498 |
profiles[openName] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
499 |
common.open_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
500 |
}); |
36534
b74ff34537ac
8151800: Jib profile for open linux should produce compact profiles images by default
erikj
parents:
36532
diff
changeset
|
501 |
// The open only profiles on linux are used for reference builds and should |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
502 |
// produce the compact profile images by default. This adds "profiles" as an |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
503 |
// extra default target. |
36534
b74ff34537ac
8151800: Jib profile for open linux should produce compact profiles images by default
erikj
parents:
36532
diff
changeset
|
504 |
var openOnlyProfilesExtra = { |
36170
d493c08255eb
8150504: JIB profiles for reference implementation builds
erikj
parents:
35036
diff
changeset
|
505 |
"linux-x86-open": { |
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
506 |
default_make_targets: "profiles-bundles", |
38628
11af6696675c
8158540: Open only linux-x86 builds using Jib fails when building "minimal" jvm
erikj
parents:
37972
diff
changeset
|
507 |
configure_args: "--with-jvm-variants=client,server" |
34491 | 508 |
} |
509 |
}; |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
510 |
profiles = concatObjects(profiles, openOnlyProfilesExtra); |
36534
b74ff34537ac
8151800: Jib profile for open linux should produce compact profiles images by default
erikj
parents:
36532
diff
changeset
|
511 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
512 |
// Generate debug profiles for the open only profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
513 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
514 |
var openName = name + common.open_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
515 |
var openDebugName = openName + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
516 |
profiles[openDebugName] = concatObjects(profiles[openName], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
517 |
common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
518 |
}); |
34491 | 519 |
|
42425 | 520 |
// Profiles for building the zero jvm variant. These are used for verification |
521 |
// in JPRT. |
|
522 |
var zeroProfiles = { |
|
523 |
"linux-x64-zero": { |
|
524 |
target_os: "linux", |
|
525 |
target_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
526 |
dependencies: ["devkit"], |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
527 |
configure_args: concat(common.configure_args_64bit, [ |
42425 | 528 |
"--with-zlib=system", |
529 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
530 |
"--enable-libffi-bundling" |
42980
4ab3d4b67cc0
8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents:
42848
diff
changeset
|
531 |
]) |
42425 | 532 |
}, |
533 |
||
534 |
"linux-x86-zero": { |
|
535 |
target_os: "linux", |
|
536 |
target_cpu: "x86", |
|
537 |
build_cpu: "x64", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
538 |
dependencies: ["devkit"], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
539 |
configure_args: concat(common.configure_args_32bit, [ |
42425 | 540 |
"--with-zlib=system", |
541 |
"--with-jvm-variants=zero", |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
542 |
"--enable-libffi-bundling" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
543 |
]) |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
544 |
} |
42425 | 545 |
} |
546 |
profiles = concatObjects(profiles, zeroProfiles); |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
547 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
548 |
// Add the base settings to the zero profiles and generate debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
549 |
Object.keys(zeroProfiles).forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
550 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
551 |
profiles[name] = concatObjects(common.main_profile_base, profiles[name]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
552 |
profiles[debugName] = concatObjects(profiles[name], common.debug_profile_base); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
553 |
}); |
42425 | 554 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
555 |
// Profiles used to run tests. Used in JPRT and Mach 5. |
34491 | 556 |
var testOnlyProfiles = { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
557 |
"run-test-jprt": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
558 |
target_os: input.build_os, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
559 |
target_cpu: input.build_cpu, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
560 |
dependencies: [ "jtreg", "gnumake", "boot_jdk" ], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
561 |
labels: "test", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
562 |
environment: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
563 |
"JT_JAVA": common.boot_jdk_home |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
564 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
565 |
}, |
34491 | 566 |
|
567 |
"run-test": { |
|
568 |
target_os: input.build_os, |
|
569 |
target_cpu: input.build_cpu, |
|
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
570 |
dependencies: [ "jtreg", "gnumake", "boot_jdk" ], |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
571 |
labels: "test", |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
572 |
environment: { |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
573 |
"JT_JAVA": common.boot_jdk_home |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
574 |
} |
34491 | 575 |
} |
576 |
}; |
|
577 |
profiles = concatObjects(profiles, testOnlyProfiles); |
|
578 |
||
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
579 |
// Profiles used to run tests using Jib for internal dependencies. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
580 |
var testedProfile = input.testedProfile; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
581 |
if (testedProfile == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
582 |
testedProfile = input.build_os + "-" + input.build_cpu; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
583 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
584 |
var testOnlyProfilesPrebuilt = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
585 |
"run-test-prebuilt": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
586 |
src: "src.conf", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
587 |
dependencies: [ "jtreg", "gnumake", testedProfile + ".jdk", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
588 |
testedProfile + ".test", "src.full" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
589 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
590 |
work_dir: input.get("src.full", "install_path") + "/test", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
591 |
environment: { |
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
592 |
"JT_JAVA": common.boot_jdk_home, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
593 |
"PRODUCT_HOME": input.get(testedProfile + ".jdk", "home_path"), |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
594 |
"TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path"), |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
595 |
"TEST_OUTPUT_DIR": input.src_top_dir |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
596 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
597 |
labels: "test" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
598 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
599 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
600 |
// If actually running the run-test-prebuilt profile, verify that the input |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
601 |
// variable is valid and if so, add the appropriate target_* values from |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
602 |
// the tested profile. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
603 |
if (input.profile == "run-test-prebuilt") { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
604 |
if (profiles[testedProfile] == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
605 |
error("testedProfile is not defined: " + testedProfile); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
606 |
} else { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
607 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
608 |
= profiles[testedProfile]["target_os"]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
609 |
testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
610 |
= profiles[testedProfile]["target_cpu"]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
611 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
612 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
613 |
profiles = concatObjects(profiles, testOnlyProfilesPrebuilt); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
614 |
|
43288
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
615 |
// On macosx add the devkit bin dir to the path in all the run-test profiles. |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
616 |
// This gives us a guaranteed working version of lldb for the jtreg failure handler. |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
617 |
if (input.build_os == "macosx") { |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
618 |
macosxRunTestExtra = { |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
619 |
dependencies: [ "devkit" ], |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
620 |
environment_path: input.get("devkit", "install_path") |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
621 |
+ "/Xcode.app/Contents/Developer/usr/bin" |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
622 |
} |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
623 |
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra); |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
624 |
profiles["run-test-jprt"] = concatObjects(profiles["run-test-jprt"], macosxRunTestExtra); |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
625 |
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra); |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
626 |
} |
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
627 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
628 |
// |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
629 |
// Define artifacts for profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
630 |
// |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
631 |
// Macosx bundles are named osx and Windows demo bundles use zip instead of |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
632 |
// tar.gz. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
633 |
var artifactData = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
634 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
635 |
platform: "linux-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
636 |
demo_ext: "tar.gz" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
637 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
638 |
"linux-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
639 |
platform: "linux-x86", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
640 |
demo_ext: "tar.gz" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
641 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
642 |
"macosx-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
643 |
platform: "osx-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
644 |
demo_ext: "tar.gz" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
645 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
646 |
"solaris-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
647 |
platform: "solaris-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
648 |
demo_ext: "tar.gz" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
649 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
650 |
"solaris-sparcv9": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
651 |
platform: "solaris-sparcv9", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
652 |
demo_ext: "tar.gz" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
653 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
654 |
"windows-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
655 |
platform: "windows-x64", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
656 |
demo_ext: "zip" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
657 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
658 |
"windows-x86": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
659 |
platform: "windows-x86", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
660 |
demo_ext: "zip" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
661 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
662 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
663 |
// Generate common artifacts for all main profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
664 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
665 |
profiles[name] = concatObjects(profiles[name], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
666 |
common.main_profile_artifacts(artifactData[name].platform, artifactData[name].demo_ext)); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
667 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
668 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
669 |
// Generate common artifacts for all debug profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
670 |
common.main_profile_names.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
671 |
var debugName = name + common.debug_suffix; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
672 |
profiles[debugName] = concatObjects(profiles[debugName], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
673 |
common.debug_profile_artifacts(artifactData[name].platform)); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
674 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
675 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
676 |
// Extra profile specific artifacts |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
677 |
profilesArtifacts = { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
678 |
"linux-x64": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
679 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
680 |
doc_api_spec: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
681 |
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
682 |
remote: [ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
683 |
"bundles/common/jdk-" + data.version + "_doc-api-spec.tar.gz", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
684 |
"bundles/linux-x64/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
685 |
], |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
686 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
687 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
688 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
689 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
690 |
"linux-x64-open": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
691 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
692 |
jdk: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
693 |
local: "bundles/\\(jdk.*bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
694 |
remote: "bundles/openjdk/GPL/linux-x64/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
695 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
696 |
jre: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
697 |
local: "bundles/\\(jre.*bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
698 |
remote: "bundles/openjdk/GPL/linux-x64/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
699 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
700 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
701 |
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
702 |
remote: "bundles/openjdk/GPL/linux-x64/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
703 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
704 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
705 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
706 |
remote: "bundles/openjdk/GPL/linux-x64/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
707 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
708 |
jre_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
709 |
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
710 |
remote: "bundles/openjdk/GPL/linux-x64/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
711 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
712 |
demo: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
713 |
local: "bundles/\\(jdk.*demo.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
714 |
remote: "bundles/openjdk/GPL/linux-x64/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
715 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
716 |
doc_api_spec: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
717 |
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
718 |
remote: "bundles/openjdk/GPL/linux-x64/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
719 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
720 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
721 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
722 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
723 |
"linux-x86-open": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
724 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
725 |
jdk: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
726 |
local: "bundles/\\(jdk.*bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
727 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
728 |
}, |
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
729 |
jdk_symbols: { |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
730 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
731 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
732 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
733 |
jre: { |
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
734 |
// This regexp needs to not match the compact* files below |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
735 |
local: "bundles/\\(jre.*[+][0-9]\\{1,\\}_linux-x86_bin.tar.gz\\)", |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
736 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
737 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
738 |
jre_compact1: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
739 |
local: "bundles/\\(jre.*-compact1_linux-x86_bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
740 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
741 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
742 |
jre_compact2: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
743 |
local: "bundles/\\(jre.*-compact2_linux-x86_bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
744 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
745 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
746 |
jre_compact3: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
747 |
local: "bundles/\\(jre.*-compact3_linux-x86_bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
748 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42980
diff
changeset
|
749 |
}, |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
750 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
751 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
752 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
753 |
"windows-x86-open": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
754 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
755 |
jdk: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
756 |
local: "bundles/\\(jdk.*bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
757 |
remote: "bundles/openjdk/GPL/windows-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
758 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
759 |
jre: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
760 |
local: "bundles/\\(jre.*bin.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
761 |
remote: "bundles/openjdk/GPL/windows-x86/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
762 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
763 |
test: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
764 |
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
765 |
remote: "bundles/openjdk/GPL/windows-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
766 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
767 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
768 |
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
769 |
remote: "bundles/openjdk/GPL/windows-x86/\\1" |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
770 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
771 |
jre_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
772 |
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
773 |
remote: "bundles/openjdk/GPL/windows-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
774 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
775 |
demo: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
776 |
local: "bundles/\\(jdk.*demo.zip\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
777 |
remote: "bundles/openjdk/GPL/windows-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
778 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
779 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
780 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
781 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
782 |
"linux-x86-open-debug": { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
783 |
artifacts: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
784 |
jdk: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
785 |
local: "bundles/\\(jdk.*bin-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
786 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
787 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
788 |
jre: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
789 |
local: "bundles/\\(jre.*bin-debug.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
790 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
791 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
792 |
jdk_symbols: { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
793 |
local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
794 |
remote: "bundles/openjdk/GPL/profile/linux-x86/\\1", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
795 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
796 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
797 |
}, |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
798 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
799 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
800 |
profiles = concatObjects(profiles, profilesArtifacts); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
801 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
802 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
803 |
// Define the reference implementation profiles. These are basically the same |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
804 |
// as the open profiles, but upload artifacts to a different location and |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
805 |
// are only defined for specific platforms. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
806 |
profiles["linux-x64-ri"] = clone(profiles["linux-x64-open"]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
807 |
profiles["linux-x86-ri"] = clone(profiles["linux-x86-open"]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
808 |
profiles["linux-x86-ri-debug"] = clone(profiles["linux-x86-open-debug"]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
809 |
profiles["windows-x86-ri"] = clone(profiles["windows-x86-open"]); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
810 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
811 |
// Generate artifacts for ri profiles |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
812 |
[ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "windows-x86-ri" ] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
813 |
.forEach(function (name) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
814 |
// Rewrite all remote dirs to "bundles/openjdk/BCL/..." |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
815 |
for (artifactName in profiles[name].artifacts) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
816 |
var artifact = profiles[name].artifacts[artifactName]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
817 |
artifact.remote = replaceAll("\/GPL\/", "/BCL/", |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
818 |
(artifact.remote != null ? artifact.remote : artifact.local)); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
819 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
820 |
}); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
821 |
|
34491 | 822 |
// Generate the missing platform attributes |
823 |
profiles = generatePlatformAttributes(profiles); |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
824 |
profiles = generateDefaultMakeTargetsConfigureArg(common, profiles); |
34491 | 825 |
return profiles; |
826 |
}; |
|
827 |
||
828 |
/** |
|
829 |
* Generate the dependencies part of the configuration |
|
830 |
* |
|
831 |
* @param input External data to use for generating the configuration |
|
832 |
* @param common The common values |
|
833 |
* @returns {{}} Dependencies part of configuration |
|
834 |
*/ |
|
34496 | 835 |
var getJibProfilesDependencies = function (input, common) { |
34491 | 836 |
|
837 |
var devkit_platform_revisions = { |
|
42425 | 838 |
linux_x64: "gcc4.9.2-OEL6.4+1.1", |
34491 | 839 |
macosx_x64: "Xcode6.3-MacOSX10.9+1.0", |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
34496
diff
changeset
|
840 |
solaris_x64: "SS12u4-Solaris11u1+1.0", |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
34496
diff
changeset
|
841 |
solaris_sparcv9: "SS12u4-Solaris11u1+1.0", |
34491 | 842 |
windows_x64: "VS2013SP4+1.0" |
843 |
}; |
|
844 |
||
845 |
var devkit_platform = (input.target_cpu == "x86" |
|
846 |
? input.target_os + "_x64" |
|
847 |
: input.target_platform); |
|
848 |
||
849 |
var dependencies = { |
|
850 |
||
851 |
boot_jdk: { |
|
852 |
server: "javare", |
|
853 |
module: "jdk", |
|
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
854 |
revision: common.boot_jdk_revision, |
43919 | 855 |
checksum_file: common.boot_jdk_platform + "/MD5_VALUES", |
856 |
file: common.boot_jdk_platform + "/jdk-" + common.boot_jdk_revision |
|
857 |
+ "-" + common.boot_jdk_platform + ".tar.gz", |
|
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
858 |
configure_args: "--with-boot-jdk=" + common.boot_jdk_home, |
43288
58b8748ef90d
8173476: Provide lldb from devkit when running tests on macosx
erikj
parents:
43049
diff
changeset
|
859 |
environment_path: common.boot_jdk_home + "/bin" |
34491 | 860 |
}, |
861 |
||
862 |
devkit: { |
|
863 |
organization: common.organization, |
|
864 |
ext: "tar.gz", |
|
865 |
module: "devkit-" + devkit_platform, |
|
866 |
revision: devkit_platform_revisions[devkit_platform] |
|
867 |
}, |
|
868 |
||
869 |
build_devkit: { |
|
870 |
organization: common.organization, |
|
871 |
ext: "tar.gz", |
|
872 |
module: "devkit-" + input.build_platform, |
|
873 |
revision: devkit_platform_revisions[input.build_platform] |
|
874 |
}, |
|
875 |
||
876 |
cups: { |
|
877 |
organization: common.organization, |
|
878 |
ext: "tar.gz", |
|
879 |
revision: "1.0118+1.0" |
|
880 |
}, |
|
881 |
||
882 |
jtreg: { |
|
883 |
server: "javare", |
|
36506 | 884 |
revision: "4.2", |
43049 | 885 |
build_number: "b05", |
34491 | 886 |
checksum_file: "MD5_VALUES", |
36506 | 887 |
file: "jtreg_bin-4.2.zip", |
41047
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
888 |
environment_name: "JT_HOME", |
de6f69208f82
8164301: jib should provide a JDK for running jtreg with
erikj
parents:
40241
diff
changeset
|
889 |
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin" |
34491 | 890 |
}, |
891 |
||
892 |
gnumake: { |
|
893 |
organization: common.organization, |
|
894 |
ext: "tar.gz", |
|
895 |
revision: "4.0+1.0", |
|
896 |
||
897 |
module: (input.build_os == "windows" |
|
898 |
? "gnumake-" + input.build_osenv_platform |
|
899 |
: "gnumake-" + input.build_platform), |
|
900 |
||
901 |
configure_args: (input.build_os == "windows" |
|
902 |
? "MAKE=" + input.get("gnumake", "install_path") + "/cygwin/bin/make" |
|
903 |
: "MAKE=" + input.get("gnumake", "install_path") + "/bin/make"), |
|
904 |
||
905 |
environment_path: (input.build_os == "windows" |
|
906 |
? input.get("gnumake", "install_path") + "/cygwin/bin" |
|
907 |
: input.get("gnumake", "install_path") + "/bin") |
|
908 |
}, |
|
909 |
||
910 |
freetype: { |
|
911 |
organization: common.organization, |
|
912 |
ext: "tar.gz", |
|
44399 | 913 |
revision: "2.7.1-v120+1.0", |
34491 | 914 |
module: "freetype-" + input.target_platform |
915 |
} |
|
916 |
}; |
|
917 |
||
918 |
return dependencies; |
|
919 |
}; |
|
920 |
||
921 |
/** |
|
922 |
* Generate the missing platform attributes for profiles |
|
923 |
* |
|
924 |
* @param profiles Profiles map to generate attributes on |
|
925 |
* @returns {{}} New profiles map with platform attributes fully filled in |
|
926 |
*/ |
|
927 |
var generatePlatformAttributes = function (profiles) { |
|
928 |
var ret = concatObjects(profiles, {}); |
|
929 |
for (var profile in profiles) { |
|
930 |
if (ret[profile].build_os == null) { |
|
931 |
ret[profile].build_os = ret[profile].target_os; |
|
932 |
} |
|
933 |
if (ret[profile].build_cpu == null) { |
|
934 |
ret[profile].build_cpu = ret[profile].target_cpu; |
|
935 |
} |
|
936 |
ret[profile].target_platform = ret[profile].target_os + "_" + ret[profile].target_cpu; |
|
937 |
ret[profile].build_platform = ret[profile].build_os + "_" + ret[profile].build_cpu; |
|
938 |
} |
|
939 |
return ret; |
|
940 |
}; |
|
941 |
||
942 |
/** |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
943 |
* The default_make_targets attribute on a profile is not a real Jib attribute. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
944 |
* This function rewrites that attribute into the corresponding configure arg. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
945 |
* Calling this function multiple times on the same profiles object is safe. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
946 |
* |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
947 |
* @param common Common values |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
948 |
* @param profiles Profiles map to rewrite profiles for |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
949 |
* @returns {{}} New map of profiles with the make targets converted |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
950 |
*/ |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
951 |
var generateDefaultMakeTargetsConfigureArg = function (common, profiles) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
952 |
var ret = concatObjects(profiles, {}); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
953 |
for (var profile in ret) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
954 |
if (ret[profile]["default_make_targets"] != null) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
955 |
var targetsString = concat(ret[profile].default_make_targets).join(" "); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
956 |
// Iterate over all configure args and see if --with-default-make-target |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
957 |
// is already there and change it, otherwise add it. |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
958 |
var found = false; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
959 |
for (var i in ret[profile].configure_args) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
960 |
var arg = ret[profile].configure_args[i]; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
961 |
if (arg != null && arg.startsWith("--with-default-make-target=")) { |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
962 |
found = true; |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
963 |
ret[profile].configure_args[i] |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
964 |
= "--with-default-make-target=" + targetsString; |
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
965 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
966 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
967 |
if (!found) { |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
968 |
ret[profile].configure_args = concat( |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
969 |
ret[profile].configure_args, |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
970 |
"--with-default-make-target=" + targetsString); |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
971 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
972 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
973 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
974 |
return ret; |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
975 |
} |
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
976 |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
977 |
var getBuildId = function (input) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
978 |
if (input.build_id != null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
979 |
return input.build_id; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
980 |
} else { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
981 |
var topdir = new java.io.File(__DIR__, "../..").getCanonicalFile().getName(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
982 |
var userName = java.lang.System.getProperty("user.name"); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
983 |
return userName + "." + topdir; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
984 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
985 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
986 |
|
37649
3809534d4531
8154841: Let different Jib profiles have different default make targets
erikj
parents:
37407
diff
changeset
|
987 |
/** |
34491 | 988 |
* Deep clones an object tree. |
989 |
* |
|
990 |
* @param o Object to clone |
|
991 |
* @returns {{}} Clone of o |
|
992 |
*/ |
|
993 |
var clone = function (o) { |
|
994 |
return JSON.parse(JSON.stringify(o)); |
|
995 |
}; |
|
996 |
||
997 |
/** |
|
998 |
* Concatenates all arguments into a new array |
|
999 |
* |
|
1000 |
* @returns {Array.<T>} New array containing all arguments |
|
1001 |
*/ |
|
1002 |
var concat = function () { |
|
1003 |
return Array.prototype.concat.apply([], arguments); |
|
1004 |
}; |
|
1005 |
||
1006 |
/** |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1007 |
* Takes a String or Array of Strings and does a replace operation on each |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1008 |
* of them. |
34491 | 1009 |
* |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1010 |
* @param pattern Pattern to look for |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1011 |
* @param replacement Replacement text to insert |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1012 |
* @param a String or Array of Strings to replace |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1013 |
* @returns {Array} Either a new array or a new string depending on the input |
34491 | 1014 |
*/ |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1015 |
var replaceAll = function (pattern, replacement, a) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1016 |
// If a is an array |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1017 |
if (Array === a.constructor) { |
34491 | 1018 |
var newA = []; |
1019 |
for (var i in a) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1020 |
newA.push(a[i].replace(pattern, replacement)); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1021 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1022 |
return newA; |
34491 | 1023 |
} else { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1024 |
return a.replace(pattern, replacement); |
34491 | 1025 |
} |
1026 |
}; |
|
1027 |
||
1028 |
/** |
|
1029 |
* Deep concatenation of two objects. For each node encountered, merge |
|
1030 |
* the contents with the corresponding node in the other object tree, |
|
1031 |
* treating all strings as array elements. |
|
1032 |
* |
|
1033 |
* @param o1 Object to concatenate |
|
1034 |
* @param o2 Object to concatenate |
|
1035 |
* @returns {{}} New object tree containing the concatenation of o1 and o2 |
|
1036 |
*/ |
|
1037 |
var concatObjects = function (o1, o2) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1038 |
if (o1 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1039 |
return clone(o2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1040 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1041 |
if (o2 == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1042 |
return clone(o1); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1043 |
} |
34491 | 1044 |
var ret = {}; |
1045 |
for (var a in o1) { |
|
1046 |
if (o2[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1047 |
ret[a] = clone(o1[a]); |
34491 | 1048 |
} |
1049 |
} |
|
1050 |
for (var a in o2) { |
|
1051 |
if (o1[a] == null) { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1052 |
ret[a] = clone(o2[a]); |
34491 | 1053 |
} else { |
1054 |
if (typeof o1[a] == 'string') { |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1055 |
ret[a] = clone([o1[a]].concat(o2[a])); |
34491 | 1056 |
} else if (Array.isArray(o1[a])) { |
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1057 |
ret[a] = clone(o1[a].concat(o2[a])); |
34491 | 1058 |
} else if (typeof o1[a] == 'object') { |
1059 |
ret[a] = concatObjects(o1[a], o2[a]); |
|
1060 |
} |
|
1061 |
} |
|
1062 |
} |
|
1063 |
return ret; |
|
1064 |
}; |
|
42848
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1065 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1066 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1067 |
* Constructs the numeric version string from reading the |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1068 |
* common/autoconf/version-numbers file and removing all trailing ".0". |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1069 |
* |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1070 |
* @param major Override major version |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1071 |
* @param minor Override minor version |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1072 |
* @param security Override security version |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1073 |
* @param patch Override patch version |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1074 |
* @returns {String} The numeric version string |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1075 |
*/ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1076 |
var getVersion = function (major, minor, security, patch) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1077 |
var version_numbers = getVersionNumbers(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1078 |
var version = (major != null ? major : version_numbers.get("DEFAULT_VERSION_MAJOR")) |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1079 |
+ "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR")) |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1080 |
+ "." + (security != null ? security : version_numbers.get("DEFAULT_VERSION_SECURITY")) |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1081 |
+ "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1082 |
while (version.match(".*\.0$")) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1083 |
version = version.substring(0, version.length - 2); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1084 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1085 |
return version; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1086 |
}; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1087 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1088 |
// Properties representation of the common/autoconf/version-numbers file. Lazily |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1089 |
// initiated by the function below. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1090 |
var version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1091 |
|
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1092 |
/** |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1093 |
* Read the common/autoconf/version-numbers file into a Properties object. |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1094 |
* |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1095 |
* @returns {java.utilProperties} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1096 |
*/ |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1097 |
var getVersionNumbers = function () { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1098 |
// Read version information from common/autoconf/version-numbers |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1099 |
if (version_numbers == null) { |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1100 |
version_numbers = new java.util.Properties(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1101 |
var stream = new java.io.FileInputStream(__DIR__ + "/../../common/autoconf/version-numbers"); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1102 |
version_numbers.load(stream); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1103 |
stream.close(); |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1104 |
} |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1105 |
return version_numbers; |
27ad8b2418f7
8170741: Enable uploading of built artifacts through Jib
erikj
parents:
42425
diff
changeset
|
1106 |
} |