| #!/usr/bin/env bash |
| #******************************************************************************* |
| # Copyright (c) 2016 IBM Corporation and others. |
| # All rights reserved. This program and the accompanying materials |
| # are made available under the terms of the Eclipse Public License v1.0 |
| # which accompanies this distribution, and is available at |
| # http://www.eclipse.org/legal/epl-v10.html |
| # |
| # 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.7.0} |
| export BUILD_TYPE=${BUILD_TYPE:-N} |
| |
| # 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" |
| # |
| # 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=${TMP_DIR} -Dtycho.localArtifacts=ignore ${MIRROR_SETTING}} |
| |
| export MAVEN_PATH=${MAVEN_PATH:-/shared/common/apache-maven-3.3.3/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.6.1 |
| |
| 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 =~ [IMXYP] ]] |
| 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/jdk1.8.0_x64-latest/bin/javadoc" |
| |
| #export USING_TYCHO_SNAPSHOT=false |
| export PATCH_TYCHO=false |
| export PATCH_SWT=false |