make/conf/jib-profiles.js
author prr
Mon, 06 Nov 2017 10:11:19 -0800
changeset 47717 4a00b088902e
parent 47701 be620a591379
child 47721 d2b306a70bf1
child 47806 b6c19518372e
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     1
/*
44727
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
     2
 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     4
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    10
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    15
 * accompanied this code).
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    16
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    20
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    23
 * questions.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    24
 */
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    25
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    26
/*
34496
b05757ebc035 8145185: Rename JAB the build tool to JIB
erikj
parents: 34491
diff changeset
    27
 * This file defines build profiles for the JIB tool and others.
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    28
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    29
 * A build profile defines a set of configuration options and external
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    30
 * dependencies that we for some reason or other care about specifically.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    31
 * Typically, build profiles are defined for the build configurations we
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    32
 * build regularly.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    33
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    34
 * Contract against this file from the tools that use it, is to provide
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    35
 * a function on the form:
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    36
 *
34496
b05757ebc035 8145185: Rename JAB the build tool to JIB
erikj
parents: 34491
diff changeset
    37
 * getJibProfiles(input)
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    38
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    39
 * which returns an object graph describing the profiles and their
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    40
 * dependencies. The name of the function is based on the name of this
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    41
 * file, minus the extension and the '-', camel cased and prefixed with
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    42
 * 'get'.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    43
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    44
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    45
 * The parameter 'input' is an object that optionally contains  some data.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    46
 * Optionally because a tool may read the configuration for different purposes.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    47
 * To initially get a list of available profiles, the active profile may not
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    48
 * yet be known for instance.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    49
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    50
 * Data that may be set on the input object:
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    51
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    52
 * input.profile = <name of active profile>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    53
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    54
 * If the active profile is set, the following data from it must also
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    55
 * be provided:
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    56
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    57
 * input.profile
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
    58
 * input.build_id
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    59
 * input.target_os
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    60
 * input.target_cpu
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    61
 * input.build_os
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    62
 * input.build_cpu
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    63
 * input.target_platform
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    64
 * input.build_platform
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    65
 * // The build_osenv_* variables describe the unix layer on Windows systems,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    66
 * // i.e. Cygwin, which may also be 32 or 64 bit.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    67
 * input.build_osenv
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    68
 * input.build_osenv_cpu
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    69
 * input.build_osenv_platform
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    70
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    71
 * For more complex nested attributes, there is a method "get":
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    72
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    73
 * input.get("<dependency>", "<attribute>")
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    74
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    75
 * Valid attributes are:
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    76
 * install_path
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    77
 * download_path
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    78
 * download_dir
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    79
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    80
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    81
 * The output data generated by this configuration file has the following
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    82
 * format:
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    83
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    84
 * data: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    85
 *   // Identifies the version of this format to the tool reading it
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    86
 *   format_version: "1.0",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    87
 *
34496
b05757ebc035 8145185: Rename JAB the build tool to JIB
erikj
parents: 34491
diff changeset
    88
 *   // Name of base outputdir. JIB assumes the actual output dir is formed
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    89
 *   // by adding the configuration name: <output_basedir>/<config-name>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    90
 *   output_basedir: "build",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    91
 *   // Configure argument to use to specify configuration name
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    92
 *   configuration_configure_arg:
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    93
 *   // Make argument to use to specify configuration name
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    94
 *   configuration_make_arg:
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    95
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    96
 *   profiles: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    97
 *     <profile-name>: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    98
 *       // Name of os the profile is built to run on
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
    99
 *       target_os; <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   100
 *       // Name of cpu the profile is built to run on
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   101
 *       target_cpu; <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   102
 *       // Combination of target_os and target_cpu for convenience
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   103
 *       target_platform; <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   104
 *       // Name of os the profile is built on
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   105
 *       build_os; <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   106
 *       // Name of cpu the profile is built on
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   107
 *       build_cpu; <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   108
 *       // Combination of build_os and build_cpu for convenience
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   109
 *       build_platform; <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   110
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   111
 *       // List of dependencies needed to build this profile
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   112
 *       dependencies: <Array of strings>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   113
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   114
 *       // List of configure args to use for this profile
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   115
 *       configure_args: <Array of strings>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   116
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   117
 *       // List of free form labels describing aspects of this profile
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   118
 *       labels: <Array of strings>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   119
 *     }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   120
 *   }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   121
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   122
 *   // Dependencies use a Maven like deployment structure
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   123
 *   dependencies: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   124
 *     <dependency-name>: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   125
 *       // Organization part of path defining this dependency
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   126
 *       organization: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   127
 *       // File extension for this dependency
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   128
 *       ext: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   129
 *       // Module part of path for defining this dependency,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   130
 *       // defaults to <dependency-name>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   131
 *       module: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   132
 *       // Revision part of path for defining this dependency
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   133
 *       revision: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   134
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   135
 *       // List of configure args to add when using this dependency,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   136
 *       // defaults to
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   137
 *       // "--with-<dependency-name>=input.get("<dependency-name", "install_path")"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   138
 *       configure_args: <array of strings>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   139
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   140
 *       // Name of environment variable to set when using this dependency
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   141
 *       // when running make
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   142
 *       environment_name: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   143
 *       // Value of environment variable to set when using this dependency
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   144
 *       // when running make
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   145
 *       environment_value: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   146
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   147
 *       // Value to add to the PATH variable when using this dependency,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   148
 *       // applies to both make and configure
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   149
 *       environment_path: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   150
 *     }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   151
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   152
 *     <dependency-name>: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   153
 *       // For certain dependencies where a legacy distribution mechanism is
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   154
 *       // already in place, the "javare" server layout is also supported
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   155
 *       // Indicate that an alternate server source and layout should be used
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   156
 *       server: "javare"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   157
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   158
 *       // For "javare", a combination of module, revision,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   159
 *       // build number (optional), files and checksum file is possible for
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   160
 *       // artifacts following the standard layout.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   161
 *       module: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   162
 *       revision: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   163
 *       build_number: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   164
 *       checksum_file: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   165
 *       file: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   166
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   167
 *       // For other files, use checksum path and path instead
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   168
 *       checksum_path: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   169
 *       path: <string>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   170
 *     }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   171
 *   }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   172
 * }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   173
 */
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   174
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   175
/**
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   176
 * Main entry to generate the profile configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   177
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   178
 * @param input External data to use for generating the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   179
 * @returns {{}} Profile configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   180
 */
34496
b05757ebc035 8145185: Rename JAB the build tool to JIB
erikj
parents: 34491
diff changeset
   181
var getJibProfiles = function (input) {
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   182
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   183
    var data = {};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   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
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   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
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   193
34496
b05757ebc035 8145185: Rename JAB the build tool to JIB
erikj
parents: 34491
diff changeset
   194
    // The base directory for the build output. JIB will assume that the
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   195
    // actual build directory will be <output_basedir>/<configuration>
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   196
    data.output_basedir = "build";
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   197
    // The configure argument to use to specify the name of the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   198
    data.configuration_configure_arg = "--with-conf-name=";
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   199
    // The make argument to use to specify the name of the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   200
    data.configuration_make_arg = "CONF_NAME=";
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   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
46939
23c02a1b49ee 8186218: Make JIB exclude webrev from all sub-repo levels when creating source bundles
ctornqvi
parents: 46251
diff changeset
   203
    data.src_bundle_excludes = "./build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
42848
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
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   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
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   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
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   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
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   214
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   215
    return data;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   216
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   217
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   218
/**
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   219
 * Generates some common values
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   220
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   221
 * @param input External data to use for generating the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   222
 * @returns Common values
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   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",
44625
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   234
        "solaris-sparcv9", "windows-x64", "windows-x86",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   235
        "linux-arm64", "linux-arm-vfp-hflt", "linux-arm-vfp-hflt-dyn"
42848
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
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   238
    // 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
   239
    common.main_profile_base = {
46196
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
   240
        dependencies: ["boot_jdk", "gnumake", "jtreg", "jib"],
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   241
        default_make_targets: ["product-bundles", "test-bundles"],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   242
        configure_args: concat(["--enable-jtreg-failure-handler"],
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   243
                               versionArgs(input, common))
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   244
    };
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   245
    // Extra settings for debug profiles
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   246
    common.debug_suffix = "-debug";
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   247
    common.debug_profile_base = {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   248
        configure_args: ["--enable-debug"],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   249
        labels: "debug"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   250
    };
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   251
    // Extra settings for slowdebug profiles
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   252
    common.slowdebug_suffix = "-slowdebug";
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   253
    common.slowdebug_profile_base = {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   254
        configure_args: ["--with-debug-level=slowdebug"],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   255
        labels: "slowdebug"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   256
    };
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   257
    // Extra settings for openjdk only profiles
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   258
    common.open_suffix = "-open";
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   259
    common.open_profile_base = {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   260
        configure_args: ["--enable-openjdk-only"],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   261
        labels: "open"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   262
    };
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   263
42980
4ab3d4b67cc0 8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents: 42848
diff changeset
   264
    common.configure_args_64bit = ["--with-target-bits=64"];
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   265
    common.configure_args_32bit = ["--with-target-bits=32"];
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   266
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   267
    /**
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   268
     * Define common artifacts template for all main profiles
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   269
     * @param o - Object containing data for artifacts
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   270
     */
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   271
    common.main_profile_artifacts = function (o) {
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   272
        var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   273
        var jre_subdir = (o.jre_subdir != null ? o.jre_subdir : "jre-" + data.version);
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   274
        var pf = o.platform
42848
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
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   283
                    subdir: jdk_subdir,
42848
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
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   292
                    subdir: jre_subdir,
42848
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
                },
47440
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   303
                test_demos: {
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   304
                    local: "bundles/\\(jdk.*bin-tests-demos.tar.gz\\)",
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   305
                    remote: [
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   306
                        "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-demos.tar.gz",
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   307
                        "bundles/" + pf + "/\\1"
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   308
                    ],
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   309
                    exploded: "images/test"
963f70aa578d 8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents: 47433
diff changeset
   310
                },
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   311
                jdk_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   312
                    local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   313
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   314
                        "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   315
                        "bundles/" + pf + "/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   316
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   317
                    subdir: jdk_subdir,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   318
                    exploded: "images/jdk"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   319
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   320
                jre_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   321
                    local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   322
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   323
                        "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   324
                        "bundles/" + pf + "/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   325
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   326
                    subdir: jre_subdir,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   327
                    exploded: "images/jre"
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
    /**
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   335
     * Define common artifacts template for all debug profiles
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   336
     * @param o - Object containing data for artifacts
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   337
     */
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   338
    common.debug_profile_artifacts = function (o) {
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   339
        var jdk_subdir = "jdk-" + data.version + "/fastdebug";
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   340
        var jre_subdir = "jre-" + data.version + "/fastdebug";
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   341
        var pf = o.platform
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   342
        return {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   343
            artifacts: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   344
                jdk: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   345
                    local: "bundles/\\(jdk.*bin-debug.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   346
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   347
                        "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug.tar.gz",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   348
                        "bundles/" + pf + "/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   349
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   350
                    subdir: jdk_subdir,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   351
                    exploded: "images/jdk"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   352
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   353
                jre: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   354
                    local: "bundles/\\(jre.*bin-debug.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   355
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   356
                        "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug.tar.gz",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   357
                        "bundles/" + pf + "/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   358
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   359
                    subdir: jre_subdir,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   360
                    exploded: "images/jre"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   361
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   362
                test: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   363
                    local: "bundles/\\(jdk.*bin-tests-debug.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   364
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   365
                        "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
   366
                        "bundles/" + pf + "/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   367
                    ],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   368
                    exploded: "images/test"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   369
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   370
                jdk_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   371
                    local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   372
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   373
                        "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
   374
                        "bundles/" + pf + "/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   375
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   376
                    subdir: jdk_subdir,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   377
                    exploded: "images/jdk"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   378
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   379
                jre_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   380
                    local: "bundles/\\(jre.*bin-debug-symbols.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   381
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   382
                        "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
   383
                        "bundles/" + pf + "/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   384
                    ],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   385
                    subdir: jre_subdir,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   386
                    exploded: "images/jre"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   387
                }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   388
            }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   389
        };
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   390
    };
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   391
47365
92f08900cb3c 8189679: JDK-8189094 broke testing in Mach 5
erikj
parents: 47364
diff changeset
   392
    common.boot_jdk_version = "9";
92f08900cb3c 8189679: JDK-8189094 broke testing in Mach 5
erikj
parents: 47364
diff changeset
   393
    common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk-"
92f08900cb3c 8189679: JDK-8189094 broke testing in Mach 5
erikj
parents: 47364
diff changeset
   394
        + common.boot_jdk_version
41047
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
   395
        + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
   396
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   397
    return common;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   398
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   399
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   400
/**
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   401
 * Generates the profiles part of the configuration.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   402
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   403
 * @param input External data to use for generating the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   404
 * @param common The common values
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   405
 * @returns {{}} Profiles part of the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   406
 */
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   407
var getJibProfilesProfiles = function (input, common, data) {
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   408
    // Main SE profiles
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   409
    var profiles = {
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   410
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   411
        "linux-x64": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   412
            target_os: "linux",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   413
            target_cpu: "x64",
44734
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
   414
            dependencies: ["devkit", "graphviz", "pandoc"],
44727
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
   415
            configure_args: concat(common.configure_args_64bit,
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
   416
                "--enable-full-docs", "--with-zlib=system"),
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   417
            default_make_targets: ["docs-bundles"],
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   418
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   419
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   420
        "linux-x86": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   421
            target_os: "linux",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   422
            target_cpu: "x86",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   423
            build_cpu: "x64",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   424
            dependencies: ["devkit"],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   425
            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
   426
                "--with-jvm-variants=minimal,server", "--with-zlib=system"),
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   427
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   428
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   429
        "macosx-x64": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   430
            target_os: "macosx",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   431
            target_cpu: "x64",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   432
            dependencies: ["devkit"],
45875
5fa4efe2aca3 8184022: Build JDK 10 on OSX 10.12 and above
phh
parents: 45824
diff changeset
   433
            configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
5fa4efe2aca3 8184022: Build JDK 10 on OSX 10.12 and above
phh
parents: 45824
diff changeset
   434
                "--with-macosx-version-max=10.7.0"),
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   435
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   436
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   437
        "solaris-x64": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   438
            target_os: "solaris",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   439
            target_cpu: "x64",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   440
            dependencies: ["devkit", "cups"],
42980
4ab3d4b67cc0 8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents: 42848
diff changeset
   441
            configure_args: concat(common.configure_args_64bit,
4ab3d4b67cc0 8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents: 42848
diff changeset
   442
                "--with-zlib=system", "--enable-dtrace"),
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   443
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   444
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   445
        "solaris-sparcv9": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   446
            target_os: "solaris",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   447
            target_cpu: "sparcv9",
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
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   451
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   452
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   453
        "windows-x64": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   454
            target_os: "windows",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   455
            target_cpu: "x64",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   456
            dependencies: ["devkit", "freetype"],
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),
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   458
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   459
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   460
        "windows-x86": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   461
            target_os: "windows",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   462
            target_cpu: "x86",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   463
            build_cpu: "x64",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   464
            dependencies: ["devkit", "freetype"],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   465
            configure_args: concat(common.configure_args_32bit),
44625
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   466
        },
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   467
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   468
        "linux-arm64": {
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   469
            target_os: "linux",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   470
            target_cpu: "aarch64",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   471
            build_cpu: "x64",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   472
            dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"],
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   473
            configure_args: [
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   474
                "--with-cpu-port=arm64",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   475
                "--with-jvm-variants=server",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   476
                "--openjdk-target=aarch64-linux-gnu",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   477
                "--enable-headless-only"
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   478
            ],
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   479
        },
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   480
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   481
        "linux-arm-vfp-hflt": {
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   482
            target_os: "linux",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   483
            target_cpu: "arm",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   484
            build_cpu: "x64",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   485
            dependencies: ["devkit", "build_devkit", "cups"],
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   486
            configure_args: [
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   487
                "--with-jvm-variants=minimal1,client",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   488
                "--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   489
                "--openjdk-target=arm-linux-gnueabihf",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   490
                "--with-abi-profile=arm-vfp-hflt"
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   491
            ],
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   492
        },
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   493
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   494
        // Special version of the SE profile adjusted to be testable on arm64 hardware.
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   495
        "linux-arm-vfp-hflt-dyn": {
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   496
            configure_args: "--with-stdc++lib=dynamic"
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   497
        }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   498
    };
44625
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   499
    // Let linux-arm-vfp-hflt-dyn inherit everything from linux-arm-vfp-hflt
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   500
    profiles["linux-arm-vfp-hflt-dyn"] = concatObjects(
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   501
        profiles["linux-arm-vfp-hflt-dyn"], profiles["linux-arm-vfp-hflt"]);
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   502
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   503
    // Add the base settings to all the main profiles
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   504
    common.main_profile_names.forEach(function (name) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   505
        profiles[name] = concatObjects(common.main_profile_base, profiles[name]);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   506
    });
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   507
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   508
    // Generate debug versions of all the main profiles
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   509
    common.main_profile_names.forEach(function (name) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   510
        var debugName = name + common.debug_suffix;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   511
        profiles[debugName] = concatObjects(profiles[name],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   512
                                            common.debug_profile_base);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   513
    });
36532
2f10ab82d0a8 8151726: Introduce a JPRT testset buildinfra
erikj
parents: 36170
diff changeset
   514
    // Generate slowdebug versions of all the main profiles
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   515
    common.main_profile_names.forEach(function (name) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   516
        var debugName = name + common.slowdebug_suffix;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   517
        profiles[debugName] = concatObjects(profiles[name],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   518
                                            common.slowdebug_profile_base);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   519
    });
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   520
36532
2f10ab82d0a8 8151726: Introduce a JPRT testset buildinfra
erikj
parents: 36170
diff changeset
   521
    // Generate open only profiles for all the main profiles for JPRT and reference
2f10ab82d0a8 8151726: Introduce a JPRT testset buildinfra
erikj
parents: 36170
diff changeset
   522
    // implementation builds.
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   523
    common.main_profile_names.forEach(function (name) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   524
        var openName = name + common.open_suffix;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   525
        profiles[openName] = concatObjects(profiles[name],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   526
                                           common.open_profile_base);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   527
    });
36534
b74ff34537ac 8151800: Jib profile for open linux should produce compact profiles images by default
erikj
parents: 36532
diff changeset
   528
    // 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
   529
    // 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
   530
    // extra default target.
36534
b74ff34537ac 8151800: Jib profile for open linux should produce compact profiles images by default
erikj
parents: 36532
diff changeset
   531
    var openOnlyProfilesExtra = {
36170
d493c08255eb 8150504: JIB profiles for reference implementation builds
erikj
parents: 35036
diff changeset
   532
        "linux-x86-open": {
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   533
            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
   534
            configure_args: "--with-jvm-variants=client,server"
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   535
        }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   536
    };
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   537
    profiles = concatObjects(profiles, openOnlyProfilesExtra);
36534
b74ff34537ac 8151800: Jib profile for open linux should produce compact profiles images by default
erikj
parents: 36532
diff changeset
   538
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   539
    // Generate debug profiles for the open only profiles
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   540
    common.main_profile_names.forEach(function (name) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   541
        var openName = name + common.open_suffix;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   542
        var openDebugName = openName + common.debug_suffix;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   543
        profiles[openDebugName] = concatObjects(profiles[openName],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   544
                                                common.debug_profile_base);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   545
    });
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   546
42425
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   547
    // Profiles for building the zero jvm variant. These are used for verification
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   548
    // in JPRT.
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   549
    var zeroProfiles = {
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   550
        "linux-x64-zero": {
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   551
            target_os: "linux",
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   552
            target_cpu: "x64",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   553
            dependencies: ["devkit"],
42980
4ab3d4b67cc0 8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents: 42848
diff changeset
   554
            configure_args: concat(common.configure_args_64bit, [
42425
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   555
                "--with-zlib=system",
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   556
                "--with-jvm-variants=zero",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   557
                "--enable-libffi-bundling"
42980
4ab3d4b67cc0 8171500: Explicitly set --with-target-bits=64 in 64bit jib profiles
erikj
parents: 42848
diff changeset
   558
            ])
42425
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   559
        },
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   560
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   561
        "linux-x86-zero": {
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   562
            target_os: "linux",
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   563
            target_cpu: "x86",
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   564
            build_cpu: "x64",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   565
            dependencies: ["devkit"],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   566
            configure_args:  concat(common.configure_args_32bit, [
42425
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   567
                "--with-zlib=system",
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   568
                "--with-jvm-variants=zero",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   569
                "--enable-libffi-bundling"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   570
            ])
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   571
        }
42425
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   572
    }
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   573
    profiles = concatObjects(profiles, zeroProfiles);
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   574
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   575
    // 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
   576
    Object.keys(zeroProfiles).forEach(function (name) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   577
        var debugName = name + common.debug_suffix;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   578
        profiles[name] = concatObjects(common.main_profile_base, profiles[name]);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   579
        profiles[debugName] = concatObjects(profiles[name], common.debug_profile_base);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   580
    });
42425
57cde06ae8d6 8141590: Cannot build Zero with devkit
erikj
parents: 42289
diff changeset
   581
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   582
    // Profiles used to run tests. Used in JPRT and Mach 5.
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   583
    var testOnlyProfiles = {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   584
        "run-test-jprt": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   585
            target_os: input.build_os,
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   586
            target_cpu: input.build_cpu,
46196
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
   587
            dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ],
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   588
            labels: "test",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   589
            environment: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   590
                "JT_JAVA": common.boot_jdk_home
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   591
            }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   592
        },
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   593
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   594
        "run-test": {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   595
            target_os: input.build_os,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   596
            target_cpu: input.build_cpu,
46196
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
   597
            dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ],
41047
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
   598
            labels: "test",
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
   599
            environment: {
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
   600
                "JT_JAVA": common.boot_jdk_home
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
   601
            }
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   602
        }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   603
    };
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   604
    profiles = concatObjects(profiles, testOnlyProfiles);
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   605
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   606
    // Profiles used to run tests using Jib for internal dependencies.
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   607
    var testedProfile = input.testedProfile;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   608
    if (testedProfile == null) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   609
        testedProfile = input.build_os + "-" + input.build_cpu;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   610
    }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   611
    var testOnlyProfilesPrebuilt = {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   612
        "run-test-prebuilt": {
45824
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   613
            target_os: input.build_os,
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   614
            target_cpu: input.build_cpu,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   615
            src: "src.conf",
46210
jwilhelm
parents: 44697 46206
diff changeset
   616
            dependencies: [ "jtreg", "gnumake", "boot_jdk", "jib", testedProfile + ".jdk",
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   617
                testedProfile + ".test", "src.full"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   618
            ],
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   619
            work_dir: input.get("src.full", "install_path") + "/test",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   620
            environment: {
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   621
                "JT_JAVA": common.boot_jdk_home,
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   622
                "PRODUCT_HOME": input.get(testedProfile + ".jdk", "home_path"),
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   623
                "TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path"),
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   624
                "TEST_OUTPUT_DIR": input.src_top_dir
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   625
            },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   626
            labels: "test"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   627
        }
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
    // 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
   630
    // 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
   631
    // the tested profile.
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   632
    if (input.profile == "run-test-prebuilt") {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   633
        if (profiles[testedProfile] == null) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   634
            error("testedProfile is not defined: " + testedProfile);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   635
        }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   636
    }
45824
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   637
    if (profiles[testedProfile] != null) {
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   638
        testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"]
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   639
            = profiles[testedProfile]["target_os"];
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   640
        testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"]
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   641
            = profiles[testedProfile]["target_cpu"];
d161a843e941 8184075: Make run-test-prebuilt profile more robust
erikj
parents: 45553
diff changeset
   642
    }
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   643
    profiles = concatObjects(profiles, testOnlyProfilesPrebuilt);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   644
43288
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   645
    // 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
   646
    // 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
   647
    if (input.build_os == "macosx") {
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   648
        macosxRunTestExtra = {
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   649
            dependencies: [ "devkit" ],
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   650
            environment_path: input.get("devkit", "install_path")
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   651
                + "/Xcode.app/Contents/Developer/usr/bin"
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   652
        }
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   653
        profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra);
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   654
        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
   655
        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
   656
    }
58b8748ef90d 8173476: Provide lldb from devkit when running tests on macosx
erikj
parents: 43049
diff changeset
   657
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   658
    //
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   659
    // Define artifacts for profiles
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   660
    //
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   661
    // Macosx bundles are named osx
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   662
    // tar.gz.
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   663
    var artifactData = {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   664
        "linux-x64": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   665
            platform: "linux-x64",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   666
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   667
        "linux-x86": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   668
            platform: "linux-x86",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   669
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   670
        "macosx-x64": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   671
            platform: "osx-x64",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   672
            jdk_subdir: "jdk-" + data.version +  ".jdk/Contents/Home",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   673
            jre_subdir: "jre-" + data.version +  ".jre/Contents/Home"
42848
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
        "solaris-x64": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   676
            platform: "solaris-x64",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   677
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   678
        "solaris-sparcv9": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   679
            platform: "solaris-sparcv9",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   680
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   681
        "windows-x64": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   682
            platform: "windows-x64",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   683
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   684
        "windows-x86": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   685
            platform: "windows-x86",
44625
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   686
        },
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   687
       "linux-arm64": {
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   688
            platform: "linux-arm64-vfp-hflt",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   689
        },
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   690
        "linux-arm-vfp-hflt": {
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   691
            platform: "linux-arm32-vfp-hflt",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   692
        },
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   693
        "linux-arm-vfp-hflt-dyn": {
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   694
            platform: "linux-arm32-vfp-hflt-dyn",
42848
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
    }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   697
    // Generate common artifacts for all main profiles
44625
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   698
    Object.keys(artifactData).forEach(function (name) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   699
        profiles[name] = concatObjects(profiles[name],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   700
            common.main_profile_artifacts(artifactData[name]));
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   701
    });
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   702
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   703
    // Generate common artifacts for all debug profiles
44625
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
   704
    Object.keys(artifactData).forEach(function (name) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   705
        var debugName = name + common.debug_suffix;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   706
        profiles[debugName] = concatObjects(profiles[debugName],
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   707
            common.debug_profile_artifacts(artifactData[name]));
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   708
    });
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   709
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   710
    // Extra profile specific artifacts
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   711
    profilesArtifacts = {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   712
        "linux-x64": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   713
            artifacts: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   714
                doc_api_spec: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   715
                    local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   716
                    remote: [
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   717
                        "bundles/common/jdk-" + data.version + "_doc-api-spec.tar.gz",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   718
                        "bundles/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
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   724
        "linux-x64-open": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   725
            artifacts: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   726
                jdk: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   727
                    local: "bundles/\\(jdk.*bin.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   728
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   729
                        "bundles/openjdk/GPL/linux-x64/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   730
                            + "_linux-x64_bin.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   731
                        "bundles/openjdk/GPL/linux-x64/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   732
                    ],
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   733
                    subdir: "jdk-" + data.version
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   734
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   735
                jre: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   736
                    local: "bundles/\\(jre.*bin.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   737
                    remote: "bundles/openjdk/GPL/linux-x64/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   738
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   739
                test: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   740
                    local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   741
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   742
                        "bundles/openjdk/GPL/linux-x64/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   743
                            + "_linux-x64_bin-tests.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   744
                        "bundles/openjdk/GPL/linux-x64/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   745
                    ]
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   746
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   747
                jdk_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   748
                    local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   749
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   750
                        "bundles/openjdk/GPL/linux-x64/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   751
                            + "_linux-x64_bin-symbols.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   752
                        "bundles/openjdk/GPL/linux-x64/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   753
                    ],
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   754
                    subdir: "jdk-" + data.version
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   755
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   756
                jre_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   757
                    local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   758
                    remote: "bundles/openjdk/GPL/linux-x64/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   759
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   760
                doc_api_spec: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   761
                    local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   762
                    remote: "bundles/openjdk/GPL/linux-x64/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   763
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   764
            }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   765
        },
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
        "linux-x86-open": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   768
            artifacts: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   769
                jdk: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   770
                    local: "bundles/\\(jdk.*bin.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   771
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   772
                        "bundles/openjdk/GPL/linux-x86/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   773
                            + "_linux-x86_bin.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   774
                        "bundles/openjdk/GPL/linux-x86/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   775
                    ],
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   776
                    subdir: "jdk-" + data.version
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   777
                },
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   778
                jdk_symbols: {
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   779
                    local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   780
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   781
                        "bundles/openjdk/GPL/linux-x86/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   782
                            + "_linux-x86_bin-symbols.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   783
                        "bundles/openjdk/GPL/linux-x86/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   784
                    ],
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   785
                    subdir: "jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   786
                },
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   787
                test: {
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   788
                    local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   789
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   790
                        "bundles/openjdk/GPL/linux-x86/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   791
                            + "_linux-x86_bin-tests.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   792
                        "bundles/openjdk/GPL/linux-x86/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   793
                    ]
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   794
                },
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   795
                jre: {
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   796
                    // This regexp needs to not match the compact* files below
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   797
                    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
   798
                    remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   799
                },
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   800
                jre_compact1: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   801
                    local: "bundles/\\(jre.*-compact1_linux-x86_bin.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   802
                    remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   803
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   804
                jre_compact2: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   805
                    local: "bundles/\\(jre.*-compact2_linux-x86_bin.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   806
                    remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   807
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   808
                jre_compact3: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   809
                    local: "bundles/\\(jre.*-compact3_linux-x86_bin.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   810
                    remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
43043
bf14e07c9075 8172241: Cleanup mistakes in jib publish support change
erikj
parents: 42980
diff changeset
   811
                },
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   812
            }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   813
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   814
47063
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   815
        "macosx-x64-open": {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   816
            artifacts: {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   817
                jdk: {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   818
                    local: "bundles/\\(jdk.*bin.tar.gz\\)",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   819
                    remote: [
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   820
                        "bundles/openjdk/GPL/osx-x64/jdk-" + data.version
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   821
                            + "_osx-x64_bin.tar.gz",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   822
                        "bundles/openjdk/GPL/osx-x64/\\1"
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   823
                    ],
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   824
                    subdir: "jdk-" + data.version
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   825
                },
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   826
                jre: {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   827
                    local: "bundles/\\(jre.*bin.tar.gz\\)",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   828
                    remote: "bundles/openjdk/GPL/osx-x64/\\1",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   829
                },
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   830
                test: {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   831
                    local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   832
                    remote: [
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   833
                        "bundles/openjdk/GPL/osx-x64/jdk-" + data.version
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   834
                            + "_osx-x64_bin-tests.tar.gz",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   835
                        "bundles/openjdk/GPL/osx-x64/\\1"
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   836
                    ]
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   837
                },
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   838
                jdk_symbols: {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   839
                    local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   840
                    remote: [
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   841
                        "bundles/openjdk/GPL/osx-x64/jdk-" + data.version
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   842
                            + "_osx-x64_bin-symbols.tar.gz",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   843
                        "bundles/openjdk/GPL/osx-x64/\\1"
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   844
                    ],
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   845
                    subdir: "jdk-" + data.version
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   846
                },
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   847
                jre_symbols: {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   848
                    local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   849
                    remote: "bundles/openjdk/GPL/osx-x64/\\1",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   850
                },
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   851
                doc_api_spec: {
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   852
                    local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   853
                    remote: "bundles/openjdk/GPL/osx-x64/\\1",
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   854
                },
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   855
            }
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   856
        },
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   857
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   858
        "windows-x86-open": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   859
            artifacts: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   860
                jdk: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   861
                    local: "bundles/\\(jdk.*bin.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   862
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   863
                        "bundles/openjdk/GPL/windows-x86/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   864
                            + "_windows-x86_bin.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   865
                        "bundles/openjdk/GPL/windows-x86/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   866
                    ],
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   867
                    subdir: "jdk-" + data.version
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   868
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   869
                jre: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   870
                    local: "bundles/\\(jre.*bin.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   871
                    remote: "bundles/openjdk/GPL/windows-x86/\\1"
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   872
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   873
                test: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   874
                    local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   875
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   876
                        "bundles/openjdk/GPL/windows-x86/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   877
                            + "_windows-x86_bin-tests.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   878
                        "bundles/openjdk/GPL/windows-x86/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   879
                    ]
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   880
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   881
                jdk_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   882
                    local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   883
                    remote: [
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   884
                        "bundles/openjdk/GPL/windows-x86/jdk-" + data.version
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   885
                            + "_windows-x86_bin-symbols.tar.gz",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   886
                        "bundles/openjdk/GPL/windows-x86/\\1"
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   887
                    ],
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
   888
                    subdir: "jdk-" + data.version
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   889
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   890
                jre_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   891
                    local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   892
                    remote: "bundles/openjdk/GPL/windows-x86/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   893
                }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   894
            }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   895
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   896
47292
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   897
        "windows-x64-open": {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   898
            artifacts: {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   899
                jdk: {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   900
                    local: "bundles/\\(jdk.*bin.tar.gz\\)",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   901
                    remote: [
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   902
                        "bundles/openjdk/GPL/windows-x64/jdk-" + data.version
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   903
                            + "_windows-x64_bin.tar.gz",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   904
                        "bundles/openjdk/GPL/windows-x64/\\1"
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   905
                    ],
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   906
                    subdir: "jdk-" + data.version
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   907
                },
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   908
                jre: {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   909
                    local: "bundles/\\(jre.*bin.tar.gz\\)",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   910
                    remote: "bundles/openjdk/GPL/windows-x64/\\1"
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   911
                },
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   912
                test: {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   913
                    local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   914
                    remote: [
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   915
                        "bundles/openjdk/GPL/windows-x64/jdk-" + data.version
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   916
                            + "_windows-x64_bin-tests.tar.gz",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   917
                        "bundles/openjdk/GPL/windows-x64/\\1"
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   918
                    ]
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   919
                },
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   920
                jdk_symbols: {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   921
                    local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   922
                    remote: [
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   923
                        "bundles/openjdk/GPL/windows-x64/jdk-" + data.version
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   924
                            + "_windows-x64_bin-symbols.tar.gz",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   925
                        "bundles/openjdk/GPL/windows-x64/\\1"
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   926
                    ],
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   927
                    subdir: "jdk-" + data.version
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   928
                },
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   929
                jre_symbols: {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   930
                    local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   931
                    remote: "bundles/openjdk/GPL/windows-x64/\\1",
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   932
                }
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   933
            }
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   934
        },
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   935
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   936
        "linux-x86-open-debug": {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   937
            artifacts: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   938
                jdk: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   939
                    local: "bundles/\\(jdk.*bin-debug.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   940
                    remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   941
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   942
                jre: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   943
                    local: "bundles/\\(jre.*bin-debug.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   944
                    remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   945
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   946
                jdk_symbols: {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   947
                    local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   948
                    remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   949
                },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   950
            }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   951
        },
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   952
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   953
    };
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   954
    profiles = concatObjects(profiles, profilesArtifacts);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   955
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   956
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   957
    // Define the reference implementation profiles. These are basically the same
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   958
    // 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
   959
    // are only defined for specific platforms.
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   960
    profiles["linux-x64-ri"] = clone(profiles["linux-x64-open"]);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   961
    profiles["linux-x86-ri"] = clone(profiles["linux-x86-open"]);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   962
    profiles["linux-x86-ri-debug"] = clone(profiles["linux-x86-open-debug"]);
47063
631b34dbf0da 8185928: Generate OpenJDK builds for Mac platform JDK 9.0.3 and beyond in Mach 5
erikj
parents: 46939
diff changeset
   963
    profiles["macosx-x64-ri"] = clone(profiles["macosx-x64-open"]);
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   964
    profiles["windows-x86-ri"] = clone(profiles["windows-x86-open"]);
47292
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   965
    profiles["windows-x64-ri"] = clone(profiles["windows-x64-open"]);
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   966
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   967
    // Generate artifacts for ri profiles
47292
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   968
    [ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "macosx-x64-ri", "windows-x86-ri", "windows-x64-ri" ]
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   969
        .forEach(function (name) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   970
            // Rewrite all remote dirs to "bundles/openjdk/BCL/..."
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   971
            for (artifactName in profiles[name].artifacts) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   972
                var artifact = profiles[name].artifacts[artifactName];
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   973
                artifact.remote = replaceAll("\/GPL\/", "/BCL/",
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   974
                    (artifact.remote != null ? artifact.remote : artifact.local));
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   975
            }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   976
        });
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
   977
45510
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   978
    // The windows ri profile needs to add the freetype license file
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   979
    profilesRiFreetype = {
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   980
        "windows-x86-ri": {
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   981
            configure_args: "--with-freetype-license="
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   982
                + input.get("freetype", "install_path")
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   983
                + "/freetype-2.7.1-v120-x86/freetype.md"
47292
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   984
        },
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   985
        "windows-x64-ri": {
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   986
            configure_args: "--with-freetype-license="
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   987
                + input.get("freetype", "install_path")
798610a8a552 8188038: Add Windows-x64-open bundles to jib-profiles.js
ctornqvi
parents: 47217
diff changeset
   988
                + "/freetype-2.7.1-v120-x64/freetype.md"
45510
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   989
        }
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   990
    };
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   991
    profiles = concatObjects(profiles, profilesRiFreetype);
ef977f09bac8 8178064: OpenJDK RI binary should include the license file for freetype
erikj
parents: 45107
diff changeset
   992
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   993
    // Generate the missing platform attributes
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   994
    profiles = generatePlatformAttributes(profiles);
37649
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
   995
    profiles = generateDefaultMakeTargetsConfigureArg(common, profiles);
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   996
    return profiles;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   997
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   998
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
   999
/**
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1000
 * Generate the dependencies part of the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1001
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1002
 * @param input External data to use for generating the configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1003
 * @param common The common values
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1004
 * @returns {{}} Dependencies part of configuration
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1005
 */
34496
b05757ebc035 8145185: Rename JAB the build tool to JIB
erikj
parents: 34491
diff changeset
  1006
var getJibProfilesDependencies = function (input, common) {
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1007
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1008
    var devkit_platform_revisions = {
47433
6331ad007664 8189119: Devkit for Linux needs to include fontconfig-devel
erikj
parents: 47365
diff changeset
  1009
        linux_x64: "gcc4.9.2-OEL6.4+1.2",
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1010
        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
  1011
        solaris_x64: "SS12u4-Solaris11u1+1.0",
09596fe63e2d 8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents: 34496
diff changeset
  1012
        solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
44625
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
  1013
        windows_x64: "VS2013SP4+1.0",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
  1014
        linux_aarch64: "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0",
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
  1015
        linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
  1016
                    ? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
cf100f579077 8177822: Move closed jib configuration for arm platforms to open
erikj
parents: 44513
diff changeset
  1017
                    : "arm-linaro-4.7+1.0")
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1018
    };
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1019
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1020
    var devkit_platform = (input.target_cpu == "x86"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1021
        ? input.target_os + "_x64"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1022
        : input.target_platform);
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1023
47364
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47292
diff changeset
  1024
    var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47292
diff changeset
  1025
        + "-" + input.build_cpu;
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47292
diff changeset
  1026
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1027
    var dependencies = {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1028
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1029
        boot_jdk: {
47364
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47292
diff changeset
  1030
            server: "jpg",
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47292
diff changeset
  1031
            product: "jdk",
47365
92f08900cb3c 8189679: JDK-8189094 broke testing in Mach 5
erikj
parents: 47364
diff changeset
  1032
            version: common.boot_jdk_version,
47364
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47292
diff changeset
  1033
            build_number: "181",
47365
92f08900cb3c 8189679: JDK-8189094 broke testing in Mach 5
erikj
parents: 47364
diff changeset
  1034
            file: "bundles/" + boot_jdk_platform + "/jdk-" + common.boot_jdk_version + "_"
47364
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47292
diff changeset
  1035
                + boot_jdk_platform + "_bin.tar.gz",
41047
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
  1036
            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
  1037
            environment_path: common.boot_jdk_home + "/bin"
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1038
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1039
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1040
        devkit: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1041
            organization: common.organization,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1042
            ext: "tar.gz",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1043
            module: "devkit-" + devkit_platform,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1044
            revision: devkit_platform_revisions[devkit_platform]
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1045
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1046
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1047
        build_devkit: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1048
            organization: common.organization,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1049
            ext: "tar.gz",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1050
            module: "devkit-" + input.build_platform,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1051
            revision: devkit_platform_revisions[input.build_platform]
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1052
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1053
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1054
        cups: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1055
            organization: common.organization,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1056
            ext: "tar.gz",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1057
            revision: "1.0118+1.0"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1058
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1059
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1060
        jtreg: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1061
            server: "javare",
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 36170
diff changeset
  1062
            revision: "4.2",
47611
7eda0a64c199 8189071: Require jtreg 4.2 b09
jwilhelm
parents: 47292
diff changeset
  1063
            build_number: "b09",
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1064
            checksum_file: "MD5_VALUES",
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 36170
diff changeset
  1065
            file: "jtreg_bin-4.2.zip",
41047
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
  1066
            environment_name: "JT_HOME",
de6f69208f82 8164301: jib should provide a JDK for running jtreg with
erikj
parents: 40241
diff changeset
  1067
            environment_path: input.get("jtreg", "install_path") + "/jtreg/bin"
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1068
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1069
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1070
        gnumake: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1071
            organization: common.organization,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1072
            ext: "tar.gz",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1073
            revision: "4.0+1.0",
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1074
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1075
            module: (input.build_os == "windows"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1076
                ? "gnumake-" + input.build_osenv_platform
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1077
                : "gnumake-" + input.build_platform),
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1078
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1079
            configure_args: (input.build_os == "windows"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1080
                ? "MAKE=" + input.get("gnumake", "install_path") + "/cygwin/bin/make"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1081
                : "MAKE=" + input.get("gnumake", "install_path") + "/bin/make"),
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1082
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1083
            environment_path: (input.build_os == "windows"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1084
                ? input.get("gnumake", "install_path") + "/cygwin/bin"
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1085
                : input.get("gnumake", "install_path") + "/bin")
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1086
        },
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1087
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1088
        freetype: {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1089
            organization: common.organization,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1090
            ext: "tar.gz",
44399
aa6d8068ec21 8177135: OpenJDK 9 freetype needs msvcr100.dll
erikj
parents: 43919
diff changeset
  1091
            revision: "2.7.1-v120+1.0",
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1092
            module: "freetype-" + input.target_platform
44727
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1093
        },
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1094
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1095
        graphviz: {
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1096
            organization: common.organization,
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1097
            ext: "tar.gz",
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1098
            revision: "2.38.0-1+1.1",
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1099
            module: "graphviz-" + input.target_platform,
45107
8d21264e7878 8180420: Set PATH for dot and pandoc in JIB
ihse
parents: 45099
diff changeset
  1100
            configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
8d21264e7878 8180420: Set PATH for dot and pandoc in JIB
ihse
parents: 45099
diff changeset
  1101
            environment_path: input.get("graphviz", "install_path")
44727
ca162fc20601 8178965: Second part of JDK-8176785
ihse
parents: 44626
diff changeset
  1102
        },
44734
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
  1103
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
  1104
        pandoc: {
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
  1105
            organization: common.organization,
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
  1106
            ext: "tar.gz",
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
  1107
            revision: "1.17.2+1.0",
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
  1108
            module: "pandoc-" + input.target_platform,
45107
8d21264e7878 8180420: Set PATH for dot and pandoc in JIB
ihse
parents: 45099
diff changeset
  1109
            configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
8d21264e7878 8180420: Set PATH for dot and pandoc in JIB
ihse
parents: 45099
diff changeset
  1110
            environment_path: input.get("pandoc", "install_path") + "/pandoc"
44734
70bbd6884287 8179022: Add serialization spec as markdown
ihse
parents: 44727
diff changeset
  1111
        },
46196
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1112
        // This adds java jib as a dependency for the test artifacts resolver
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1113
        jib: {
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1114
            organization: "com.oracle.java.jib",
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1115
            ext: "zip",
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1116
            classifier: "distribution",
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1117
            revision: "3.0-SNAPSHOT",
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1118
            environment_name: "JIB_JAR",
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1119
            environment_value: input.get("jib", "install_path")
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1120
                + "/jib-3.0-SNAPSHOT-distribution/lib/jib-3.0-SNAPSHOT.jar"
822ca950ddaa 8175300: Enable artifact resolution for jtreg tests
ctornqvi
parents: 46193
diff changeset
  1121
       }
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1122
    };
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1123
46192
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1124
    // Need to add a value for the Visual Studio tools variable to make
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1125
    // jaot be able to pick up the Visual Studio linker in testing.
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1126
    if (input.target_os == "windows") {
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1127
        dependencies.devkit.environment = {
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1128
            VS120COMNTOOLS: input.get("devkit", "install_path") + "/Common7/Tools"
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1129
        };
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1130
    }
14c55d15c9d7 8174203: Enable AOT Jtreg tests on Windows x86_64
bobv
parents: 43049
diff changeset
  1131
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1132
    return dependencies;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1133
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1134
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1135
/**
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1136
 * Generate the missing platform attributes for profiles
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1137
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1138
 * @param profiles Profiles map to generate attributes on
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1139
 * @returns {{}} New profiles map with platform attributes fully filled in
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1140
 */
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1141
var generatePlatformAttributes = function (profiles) {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1142
    var ret = concatObjects(profiles, {});
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1143
    for (var profile in profiles) {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1144
        if (ret[profile].build_os == null) {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1145
            ret[profile].build_os = ret[profile].target_os;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1146
        }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1147
        if (ret[profile].build_cpu == null) {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1148
            ret[profile].build_cpu = ret[profile].target_cpu;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1149
        }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1150
        ret[profile].target_platform = ret[profile].target_os + "_" + ret[profile].target_cpu;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1151
        ret[profile].build_platform = ret[profile].build_os + "_" + ret[profile].build_cpu;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1152
    }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1153
    return ret;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1154
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1155
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1156
/**
37649
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1157
 * 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
  1158
 * 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
  1159
 * 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
  1160
 *
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1161
 * @param common Common values
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1162
 * @param profiles Profiles map to rewrite profiles for
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1163
 * @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
  1164
 */
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1165
var generateDefaultMakeTargetsConfigureArg = function (common, profiles) {
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1166
    var ret = concatObjects(profiles, {});
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1167
    for (var profile in ret) {
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1168
        if (ret[profile]["default_make_targets"] != null) {
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1169
            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
  1170
            // 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
  1171
            // 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
  1172
            var found = false;
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1173
            for (var i in ret[profile].configure_args) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1174
                var arg = ret[profile].configure_args[i];
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1175
                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
  1176
                    found = true;
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1177
                    ret[profile].configure_args[i]
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1178
                        = "--with-default-make-target=" + targetsString;
37649
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1179
                }
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1180
            }
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1181
            if (!found) {
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1182
                ret[profile].configure_args = concat(
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1183
                    ret[profile].configure_args,
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1184
                    "--with-default-make-target=" + targetsString);
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1185
            }
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1186
        }
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1187
    }
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1188
    return ret;
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1189
}
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1190
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1191
var getBuildId = function (input) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1192
    if (input.build_id != null) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1193
        return input.build_id;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1194
    } else {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1195
        var topdir = new java.io.File(__DIR__, "../..").getCanonicalFile().getName();
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1196
        var userName = java.lang.System.getProperty("user.name");
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1197
        return userName + "." + topdir;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1198
    }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1199
}
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1200
37649
3809534d4531 8154841: Let different Jib profiles have different default make targets
erikj
parents: 37407
diff changeset
  1201
/**
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1202
 * Deep clones an object tree.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1203
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1204
 * @param o Object to clone
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1205
 * @returns {{}} Clone of o
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1206
 */
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1207
var clone = function (o) {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1208
    return JSON.parse(JSON.stringify(o));
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1209
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1210
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1211
/**
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1212
 * Concatenates all arguments into a new array
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1213
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1214
 * @returns {Array.<T>} New array containing all arguments
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1215
 */
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1216
var concat = function () {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1217
    return Array.prototype.concat.apply([], arguments);
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1218
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1219
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1220
/**
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1221
 * 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
  1222
 * of them.
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1223
 *
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1224
 * @param pattern Pattern to look for
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1225
 * @param replacement Replacement text to insert
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1226
 * @param a String or Array of Strings to replace
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1227
 * @returns {Array} Either a new array or a new string depending on the input
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1228
 */
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1229
var replaceAll = function (pattern, replacement, a) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1230
    // If a is an array
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1231
    if (Array === a.constructor) {
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1232
    var newA = [];
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1233
    for (var i in a) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1234
            newA.push(a[i].replace(pattern, replacement));
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1235
        }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1236
        return newA;
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1237
        } else {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1238
        return a.replace(pattern, replacement);
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1239
    }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1240
};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1241
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1242
/**
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1243
 * Deep concatenation of two objects. For each node encountered, merge
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1244
 * the contents with the corresponding node in the other object tree,
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1245
 * treating all strings as array elements.
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1246
 *
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1247
 * @param o1 Object to concatenate
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1248
 * @param o2 Object to concatenate
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1249
 * @returns {{}} New object tree containing the concatenation of o1 and o2
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1250
 */
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1251
var concatObjects = function (o1, o2) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1252
    if (o1 == null) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1253
        return clone(o2);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1254
    }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1255
    if (o2 == null) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1256
        return clone(o1);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1257
    }
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1258
    var ret = {};
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1259
    for (var a in o1) {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1260
        if (o2[a] == null) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1261
            ret[a] = clone(o1[a]);
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1262
        }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1263
    }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1264
    for (var a in o2) {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1265
        if (o1[a] == null) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1266
            ret[a] = clone(o2[a]);
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1267
        } else {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1268
            if (typeof o1[a] == 'string') {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1269
                ret[a] = clone([o1[a]].concat(o2[a]));
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1270
            } else if (Array.isArray(o1[a])) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1271
                ret[a] = clone(o1[a].concat(o2[a]));
34491
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1272
            } else if (typeof o1[a] == 'object') {
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1273
                ret[a] = concatObjects(o1[a], o2[a]);
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1274
            }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1275
        }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1276
    }
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1277
    return ret;
307c28cb36c2 8136782: Introduce a build/configure wrapper
erikj
parents:
diff changeset
  1278
};
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1279
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1280
/**
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1281
 * Constructs the numeric version string from reading the
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1282
 * common/autoconf/version-numbers file and removing all trailing ".0".
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1283
 *
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1284
 * @param major Override major version
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1285
 * @param minor Override minor version
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1286
 * @param security Override security version
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1287
 * @param patch Override patch version
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1288
 * @returns {String} The numeric version string
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1289
 */
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1290
var getVersion = function (major, minor, security, patch) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1291
    var version_numbers = getVersionNumbers();
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1292
    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
  1293
        + "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR"))
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1294
        + "." + (security != null ? security :  version_numbers.get("DEFAULT_VERSION_SECURITY"))
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1295
        + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH"));
43600
092ff49ea148 8173894: jib reports version "" in jdk10
ssarne
parents: 43049
diff changeset
  1296
    while (version.match(".*\\.0$")) {
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1297
        version = version.substring(0, version.length - 2);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1298
    }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1299
    return version;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1300
};
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1301
45048
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1302
/**
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1303
 * Constructs the common version configure args based on build type and
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1304
 * other version inputs
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1305
 */
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1306
var versionArgs = function(input, common) {
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1307
    var args = ["--with-version-build=" + common.build_number];
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1308
    if (input.build_type == "promoted") {
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1309
        args = concat(args,
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1310
                      // This needs to be changed when we start building release candidates
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1311
                      "--with-version-pre=ea",
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1312
                      "--without-version-opt");
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1313
    } else {
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1314
        args = concat(args, "--with-version-opt=" + common.build_id);
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1315
    }
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1316
    return args;
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1317
}
665cd82e98dc 8180081: Adjust Jib and JDL configuration for 10 to support promotable builds
erikj
parents: 44894
diff changeset
  1318
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1319
// Properties representation of the common/autoconf/version-numbers file. Lazily
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1320
// initiated by the function below.
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1321
var version_numbers;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1322
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1323
/**
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1324
 * 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
  1325
 *
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1326
 * @returns {java.utilProperties}
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1327
 */
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1328
var getVersionNumbers = function () {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1329
    // Read version information from common/autoconf/version-numbers
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1330
    if (version_numbers == null) {
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1331
        version_numbers = new java.util.Properties();
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
  1332
        var stream = new java.io.FileInputStream(__DIR__ + "/../autoconf/version-numbers");
42848
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1333
        version_numbers.load(stream);
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1334
        stream.close();
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1335
    }
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1336
    return version_numbers;
27ad8b2418f7 8170741: Enable uploading of built artifacts through Jib
erikj
parents: 42425
diff changeset
  1337
}