diff options
-rwxr-xr-x | production/build-functions.shsource | 49 | ||||
-rw-r--r-- | production/build_eclipse_org.shsource | 9 | ||||
-rw-r--r-- | production/gather-parts.sh | 2 | ||||
-rwxr-xr-x | production/getEBuilderForDropDir.sh | 71 | ||||
-rw-r--r-- | production/master-build.sh | 2 | ||||
-rw-r--r-- | production/parse-logs.sh | 2 | ||||
-rw-r--r-- | production/publish-eclipse.sh | 2 | ||||
-rw-r--r-- | production/publish-equinox.sh | 2 | ||||
-rw-r--r-- | production/publish-repo.sh | 2 | ||||
-rwxr-xr-x | production/sdk/relengUtils/re-master-build.sh | 2 |
10 files changed, 85 insertions, 58 deletions
diff --git a/production/build-functions.shsource b/production/build-functions.shsource index 7f2d1d135..00421bf23 100755 --- a/production/build-functions.shsource +++ b/production/build-functions.shsource @@ -282,18 +282,32 @@ fn-build-id () echo ${BUILD_TYPE}${TIMESTAMP} } -# USAGE: fn-local-repo URL +# USAGE: fn-local-repo URL [TO_REPLACE] # URL: git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git +# TO_REPLACE: git://git.eclipse.org +# Note: we also define in build_eclipse_org.shsource. +# There it may already be set to 'true', for some special test +# build using a local mirror repo, for example. +# So, we change its value here, only if not defined yet. +# That's the only time +# the 'build' hostname is relevent to possibly change its +# value to true. fn-local-repo () { - checkNArgs $# 1 + checkNArgs $# 1 2 if [[ $? != 0 ]]; then return 1; fi - # we assume REPO_AND_ACCESS is exported from calling scripts + export FORCE_LOCAL_REPO=${FORCE_LOCAL_REPO:-false} URL="$1"; shift - TO_REPLACE='git://git.eclipse.org' - if [[ -n ${REPO_AND_ACCESS} && ${REPO_AND_ACCESS} != "${TO_REPLACE}" ]] + if [[ "build" == "$(hostname)" || "${FORCE_LOCAL_REPO}" == "true" ]] then - echo $URL | sed "s!$TO_REPLACE!${REPO_AND_ACCESS}!g" + # we may have gotten "here" simply because hostname is "build", + # and if so want to be sure "FORCE_LOCAL_REPO" matches + export FORCE_LOCAL_REPO=true + TO_REPLACE='git://git.eclipse.org' + if [ $# -gt 0 ]; then + TO_REPLACE="$1"; shift + fi + echo $URL | sed "s!$TO_REPLACE!file://!g" else echo $URL fi @@ -1180,19 +1194,21 @@ fn-publish-eclipse () popd } -# USAGE: fn-checkout-basebuilder BUILDER_DIR +# USAGE: fn-checkout-basebuilder BUILDER_DIR BASEBUILDER_TAG # BUILDER_DIR: /shared/eclipse/builds/R4_2_maintenance/org.eclipse.releng.basebuilder_R3_7 +# BASEBUILDER_TAG: R3_7 fn-checkout-basebuilder () { - checkNArgs $# 1 + checkNArgs $# 2 if [[ $? != 0 ]]; then return 1; fi BUILDER_DIR="$1"; shift + BASEBUILDER_TAG="$1"; shift if [ -e "$BUILDER_DIR" ]; then - echo "A basic builder directory already existed, so not re-fetched." + echo "Basebuilder directory already existed, so not re-fetched." echo " Directory found at $BUILDER_DIR." return 0 fi - echo "A basic builder did not exist, so will fetch platform and tools." + echo "Basebuilder did not exist, so will fetch version ${BASEBUILDER_TAG}" DROP_DIR=$( dirname "$BUILDER_DIR" ) # Are these as expected? TODO: change comments. echo "Drop directory: $DROP_DIR" @@ -1205,7 +1221,20 @@ fn-checkout-basebuilder () else echo "EBuilderDir already existed, so no need to fetch that" fi + # ant -f $EBuilderDir/eclipse/getBaseBuilderAndTools.xml -DWORKSPACE=$DROP_DIR -DbuilderVersion=${BASEBUILDER_TAG} ant -f $EBuilderDir/eclipse/getBaseBuilderAndTools.xml -DWORKSPACE=$DROP_DIR + + #pushd $( dirname "$BUILDER_DIR" ) + #wget --no-verbose -O basebuilder-${BASEBUILDER_TAG}.zip http://git.eclipse.org/c/platform/eclipse.platform.releng.basebuilder.git/snapshot/eclipse.platform.releng.basebuilder-${BASEBUILDER_TAG}.zip 2>&1 + #unzip -q basebuilder-${BASEBUILDER_TAG}.zip + #mv eclipse.platform.releng.basebuilder-${BASEBUILDER_TAG} "$BUILDER_DIR" + # Wile we use 'launcher' here, 'eclipse' is used in other code that shares this install, + # so we make sure it is executable. + #chmod +x "$BUILDER_DIR"/eclipse + # blob characters, '*', aren't interpreted right in string + #chmod +x "$BUILDER_DIR"/*.so* + #rm basebuilder-${BASEBUILDER_TAG}.zip + #popd } # USAGE: fn-basebuilder-launcher BUILDER_DIR diff --git a/production/build_eclipse_org.shsource b/production/build_eclipse_org.shsource index 1de9b9646..a028a1717 100644 --- a/production/build_eclipse_org.shsource +++ b/production/build_eclipse_org.shsource @@ -33,12 +33,7 @@ export MAVEN_PATH=${MAVEN_PATH:-/shared/common/apache-maven-3.1.0/bin} export PATH=$JAVA_HOME/bin:$MAVEN_PATH:$ANT_HOME/bin:$PATH -# REPO_AND_ACCESS normally defined by now, by bootstrap, but if not, we assume git access to eclipse.org -export REPO_AND_ACCESS=${REPO_AND_ACCESS:-git://git.eclipse.org/gitroot} - -AGGREGATOR_REPO=${REPO_AND_ACCESS}/platform/eclipse.platform.releng.aggregator.git - -# Only used to start antrunner for tests. May not need here? +AGGREGATOR_REPO=git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git BASEBUILDER_TAG=R38M6PlusRC3G B_GIT_EMAIL=e4Build@eclipse.org @@ -49,7 +44,7 @@ COMMITTER_ID=e4Build export MVN_DEBUG=${MVN_DEBUG:-true} export MVN_QUIET=${MVN_QUIET:-false} export UPDATE_BRANDING=true - +export FORCE_LOCAL_REPO=${FORCE_LOCAL_REPO:-false} # Need bree-libs for production builds MAVEN_BREE=-Pbree-libs diff --git a/production/gather-parts.sh b/production/gather-parts.sh index 93d5becf7..5879fddca 100644 --- a/production/gather-parts.sh +++ b/production/gather-parts.sh @@ -38,7 +38,7 @@ cp "${aggDir}/eclipse-platform-parent/target/resources/mavenproperties.propertie $SCRIPT_PATH/getEBuilderForDropDir.sh $buildDirectory $EBUILDER_HASH -fn-checkout-basebuilder "$basebuilderDir" +fn-checkout-basebuilder "$basebuilderDir" "$BASEBUILDER_TAG" launcherJar=$( fn-basebuilder-launcher "$basebuilderDir" ) diff --git a/production/getEBuilderForDropDir.sh b/production/getEBuilderForDropDir.sh index 1b2308d28..862ecfe15 100755 --- a/production/getEBuilderForDropDir.sh +++ b/production/getEBuilderForDropDir.sh @@ -11,11 +11,10 @@ then echo "BUILD_DIR not supplied, will assume current directory, for testing." BUILD_DIR=${PWD} else - # normally will exist by now, but if not, we'll create it. if [[ ! -d "${BUILD_DIR}" ]] then - echo "WARNING: BUILD_DIR did not exist, so created it: $BUILD_DIR." - mkdir -p $BUILD_DIR + echo "ERROR: BUILD_DIR did not exist." + exit 1 fi fi @@ -26,41 +25,45 @@ then fi EBUILDER=eclipse.platform.releng.aggregator +TARGETNAME=eclipse.platform.releng.aggregator +ESCRIPT_LOC=${EBUILDER}/production/testScripts -RC=0 -# don't clone, if already exists. -if [[ ! -d ${BUILD_DIR}/${EBUILDER} ]] +# don't re-fetch, if already exists. +if [[ ! -d ${BUILD_DIR}/${TARGETNAME} ]] then - #TODO: make git repo location and access variable - git clone file:///gitroot/platform/${EBUILDER} ${BUILD_DIR}/${EBUILDER} - RC=$? - if [[ $RC != 0 ]] + # remove just in case left from previous failed run + # if they exist + if [[ -f ebuilder.zip ]] + then + rm ebuilder.zip + fi + if [[ -d tempebuilder ]] then - echo "[ERROR] Cloning EBUILDER returned non zero return code: $RC" - exit $RC - fi -else - echo "INFO: ebuilder directory found to exist. Not re-cloneing." - echo "INFO: Found: ${BUILD_DIR}/${EBUILDER}" - echo "INFO: But fetching to make sure up to date," - echo "INFO: before checking out specific HASH (which may make it detached)." - pushd ${BUILD_DIR}/${EBUILDER} - git fetch - RC=$? - if [[ $RC != 0 ]] - then - echo "[ERROR] Fetch EBUILDER returned non zero return code: $RC" - exit $RC - fi - git checkout $EBUILDER_HASH - RC=$? - if [[ $RC != 0 ]] + rm -fr tempebuilder + fi + wget -O ebuilder.zip --no-verbose http://git.eclipse.org/c/platform/${EBUILDER}.git/snapshot/${EBUILDER}-${EBUILDER_HASH}.zip 2>&1 + unzip -q ebuilder.zip -d tempebuilder + mkdir -p ${BUILD_DIR}/${TARGETNAME} + rsync --recursive "tempebuilder/${EBUILDER}-${EBUILDER_HASH}/" "${BUILD_DIR}/${TARGETNAME}/" + rccode=$? + if [[ $rccode != 0 ]] then - echo "[ERROR] Checking out EBUILDER for $EBUILDER_HASH returned non zero return code: $RC" - exit $RC - fi - popd + echo "ERROR: rsync did not complete normally in $0. rccode: $rccode" + exit $rccode + fi +else + echo "INFO: ebuilder directory found to exist. Not re-fetching." + echo "INFO: Found: ${BUILD_DIR}/${TARGETNAME}" fi -exit $RC +# remove on clean exit, if they exist +if [[ -f ebuilder.zip ]] +then + rm ebuilder.zip +fi +if [[ -d tempebuilder ]] +then + rm -fr tempebuilder +fi +exit 0 diff --git a/production/master-build.sh b/production/master-build.sh index 370301507..5aff66ac6 100644 --- a/production/master-build.sh +++ b/production/master-build.sh @@ -165,7 +165,7 @@ fn-write-property MVN_DEBUG fn-write-property MVN_QUIET fn-write-property SIGNING fn-write-property UPDATE_BRANDING -fn-write-property REPO_AND_ACCESS +fn-write-property FORCE_LOCAL_REPO fn-write-property MAVEN_BREE fn-write-property GIT_PUSH fn-write-property LOCAL_REPO diff --git a/production/parse-logs.sh b/production/parse-logs.sh index a2f43a8f8..ddf6297d7 100644 --- a/production/parse-logs.sh +++ b/production/parse-logs.sh @@ -34,7 +34,7 @@ basebuilderDir=$( fn-basebuilder-dir "$BUILD_ROOT" "$BUILD_ID" "${STREAM}" ) $SCRIPT_PATH/getEBuilderForDropDir.sh $buildDirectory $EBUILDER_HASH -fn-checkout-basebuilder "$basebuilderDir" +fn-checkout-basebuilder "$basebuilderDir" "$BASEBUILDER_TAG" launcherJar=$( fn-basebuilder-launcher "$basebuilderDir" ) diff --git a/production/publish-eclipse.sh b/production/publish-eclipse.sh index 180c72688..7e415aa75 100644 --- a/production/publish-eclipse.sh +++ b/production/publish-eclipse.sh @@ -33,7 +33,7 @@ basebuilderDir=$( fn-basebuilder-dir "$BUILD_ROOT" "$BUILD_ID" "$STREAM" ) $SCRIPT_PATH/getEBuilderForDropDir.sh $buildDirectory $EBUILDER_HASH -fn-checkout-basebuilder "$basebuilderDir" +fn-checkout-basebuilder "$basebuilderDir" "$BASEBUILDER_TAG" launcherJar=$( fn-basebuilder-launcher "$basebuilderDir" ) diff --git a/production/publish-equinox.sh b/production/publish-equinox.sh index 6ce0fc2cb..41256e40a 100644 --- a/production/publish-equinox.sh +++ b/production/publish-equinox.sh @@ -150,7 +150,7 @@ basebuilderDir=$( fn-basebuilder-dir "$BUILD_ROOT" "$BUILD_ID" "$STREAM" ) $SCRIPT_PATH/getEBuilderForDropDir.sh $buildDirectory $EBUILDER_HASH -fn-checkout-basebuilder "$basebuilderDir" +fn-checkout-basebuilder "$basebuilderDir" "$BASEBUILDER_TAG" launcherJar=$( fn-basebuilder-launcher "$basebuilderDir" ) diff --git a/production/publish-repo.sh b/production/publish-repo.sh index 4572db747..4ab6d8934 100644 --- a/production/publish-repo.sh +++ b/production/publish-repo.sh @@ -31,7 +31,7 @@ basebuilderDir=$( fn-basebuilder-dir "$BUILD_ROOT" "$BUILD_ID" "$STREAM" ) $SCRIPT_PATH/getEBuilderForDropDir.sh $buildDirectory $EBUILDER_HASH -fn-checkout-basebuilder "$basebuilderDir" +fn-checkout-basebuilder "$basebuilderDir" "$BASEBUILDER_TAG" launcherJar=$( fn-basebuilder-launcher "$basebuilderDir" ) diff --git a/production/sdk/relengUtils/re-master-build.sh b/production/sdk/relengUtils/re-master-build.sh index 369e10c2d..0334b7b51 100755 --- a/production/sdk/relengUtils/re-master-build.sh +++ b/production/sdk/relengUtils/re-master-build.sh @@ -115,7 +115,7 @@ fn-write-property MVN_DEBUG fn-write-property MVN_QUIET fn-write-property SIGNING fn-write-property UPDATE_BRANDING -fn-write-property REPO_AND_ACCESS +fn-write-property FORCE_LOCAL_REPO fn-write-property MAVEN_BREE fn-write-property GIT_PUSH fn-write-property LOCAL_REPO |