Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 29ffe40cdb989b667b65a702e21028d255ae747a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/env bash
#*******************************************************************************
# Copyright (c) 2016 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
#     David Williams - initial API and implementation
#*******************************************************************************

# default definitions for this branch

# this localBuildProperties.shsource file is to ease local builds to override some variables.
# It should not be used for production builds.
source localBuildProperties.shsource 2>/dev/null
export BUILD_HOME=${BUILD_HOME:-/shared/eclipse/builds}

export BRANCH=${BRANCH:-master}
export STREAM=${STREAM:-4.12.0}
export BUILD_TYPE=${BUILD_TYPE:-I}

# If not set be caller, make sure its an empty string
# as the variable is sometimes used to "complete" a name,
# such as "repositories_${PATCH_BUILD}.txt"
# (not sure this makes a difference in bash?
# undefined is same as empty string?)
export PATCH_BUILD=${PATCH_BUILD:-""}

# PATCH_OR_BRANCH_LABEL is a very special purpose variable, used to identify 
# files in the same branch (usually master) that are to be used, such as 
# repositories_master.txt or index.template_${PATCH_OR_BRANCH}.php
# If not set in bootstrap script, infer based on patch_build or branch
if [[ -z ${PATCH_OR_BRANCH_LABEL} ]] 
then
  if [[ -z "${PATCH_BUILD}" ]] 
  then 
    export PATCH_OR_BRANCH_LABEL=${BRANCH}
  else
    export PATCH_OR_BRANCH_LABEL=${PATCH_BUILD}
  fi
fi
# environment variable to control if jars use Java 8 with pack200 or not 
# Should be temporary. See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=463510
# Not sure if this effect Maven/Tycho builds, or not. 
#export JAR_PROCESSOR_JAVA=java8

# special POM for patch builds, but by default use POM at root of $REPO_DIR
# which is default behavior
if [[ -n ${PATCH_BUILD} ]]
then
  export ALT_POM_FILE="-f eclipse.platform.releng.tychoeclipsebuilder/${PATCH_BUILD}/pom.xml"
  echo "  DEBUG: ALT_POM_FILE: $ALT_POM_FILE"
else
  export ALT_POM_FILE=""
  echo "  DEBUG: ALT_POM_FILE: None. Using normal default."
fi


eclipseStreamMajor=${STREAM:0:1}

export BUILD_ROOT=${BUILD_ROOT:-${BUILD_HOME}/${eclipseStreamMajor}${BUILD_TYPE}}

# Any invocation of Java, Ant, Maven, etc., should use this as default TMP direcotory,
# instead of the default /tmp by using
# -Djava.io.tmpdir=${TMP_DIR}
export TMP_DIR=${TMP_DIR:-${BUILD_ROOT}/tmp}
# Just in case it doesn't exist yet (it must exist first, or Java will fail)
mkdir -p ${TMP_DIR}

# these could be machine specific
export JAVA_HOME=${JAVA_HOME:-/shared/common/jdk1.8.0_x64-latest}
# required for when ant is used. Unclear how maven's "antrun" finds its version of Ant,
# built in? Or system path?
# But, without the ANT_OPTS, we do get messages about "to get repeatable builds, to ignore sysclasspath"
export ANT_HOME=${ANT_HOME:-/shared/common/apache-ant-1.9.6}
# we "add to" ANT_OPTS, since Hudson may define some required values
export ANT_OPTS="${ANT_OPTS} -Dbuild.sysclasspath=ignore -Dincludeantruntime=false"
# use separate temp dir for maven like RAMDISK
export MAVEN_TMP_DIR=${MAVEN_TMP_DIR:-${TMP_DIR}}
mkdir -p ${MAVEN_TMP_DIR}
#
# remember, MaxPermSize is specific to "Oracle VMs". It has to be removed (or over ridden)
# for other VMs or the VM might fail to start due to unrecognized -XX option.
# Normally should not use -Declipse.p2.mirrors=false, especially on a regular basis.
# Lower mx since less needed with Tycho 0.23.1. But, still higher than our previous 4G, since we do use near 4G.
export MAVEN_OPTS=${MAVEN_OPTS:--Xms2048m -Xmx5120m -Djava.io.tmpdir=${MAVEN_TMP_DIR} -Dtycho.localArtifacts=ignore ${MIRROR_SETTING}}

export MAVEN_PATH=${MAVEN_PATH:-/shared/common/maven/apache-maven-3.5.4/bin}

export PATH=$JAVA_HOME/bin:$MAVEN_PATH:$ANT_HOME/bin:$PATH

# Only used to start antrunner for tests.
# TODO: avoid this hard coding
BASEBUILDER_TAG=4.10

B_GIT_EMAIL=genie.releng@eclipse.org
B_GIT_NAME="Releng HIPP"
COMMITTER_ID=genie.releng

# MVN_DEBUG=true means verbose; gives comparator info
export MVN_DEBUG=${MVN_DEBUG:-true}
export MVN_QUIET=${MVN_QUIET:-false}

# Need bree-libs for production builds
MAVEN_BREE=-Pbree-libs


# local, non build.eclipse.org builds (or, test builds) may need to override, and turn off signing.
# otherwise, we always sign if I or M builds, but not N builds
#
if [[ $BUILD_TYPE =~ [IMXYPU] ]]
then
  SIGNING=${SIGNING:-true}
else
  SIGNING=${SIGNING:-false}
fi

# custom, environment specific setting, required to generate java doc correctly for Java 8 additions,
# in our production builds. This is anticipated to be temporary, until we find a better way
# to do it.
export JAVA_DOC_TOOL="-Declipse.javadoc=/shared/common/java/openjdk/jdk-11_x64-latest/bin/javadoc"

#export USING_TYCHO_SNAPSHOT=false
export PATCH_TYCHO=false
export PATCH_SWT=false

Back to the top