Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2014-07-29 04:46:08 -0400
committerDavid Williams2014-07-29 04:46:08 -0400
commite890f2b07e5a5d323d7e3131e1b899b8dabbb678 (patch)
tree8ce0f95ac41b3369ddbb27fbe4c8f21e58bd8b72
parenta5dc1c416c949c3b996808a6b5651809ed2c528f (diff)
downloadeclipse.platform.releng.aggregator-e890f2b07e5a5d323d7e3131e1b899b8dabbb678.tar.gz
eclipse.platform.releng.aggregator-e890f2b07e5a5d323d7e3131e1b899b8dabbb678.tar.xz
eclipse.platform.releng.aggregator-e890f2b07e5a5d323d7e3131e1b899b8dabbb678.zip
[releng] set so main "start" script launches main build "in background"
-rwxr-xr-xbootstrap/bootstrap.sh122
-rw-r--r--bootstrap/description.txt5
-rwxr-xr-xbootstrap/mb4I.sh8
-rwxr-xr-xbootstrap/mb4M.sh8
-rwxr-xr-xbootstrap/mb4N.sh7
-rwxr-xr-xbootstrap/mb4P.sh8
-rwxr-xr-xbootstrap/mb4X.sh9
-rwxr-xr-xbootstrap/mb4Y.sh8
8 files changed, 11 insertions, 164 deletions
diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh
deleted file mode 100755
index db7af188..00000000
--- a/bootstrap/bootstrap.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/env bash
-
-# Utility to get basic "startup" files for Platform's CBI Build
-
-# this buildeclipse.shsource file is to ease local builds to override some variables.
-# It should not be used for production builds.
-source buildeclipse.shsource 2>/dev/null
-export BUILD_HOME=${BUILD_HOME:-/shared/eclipse/builds}
-
-function usage ()
-{
- printf "\n\t%s\n" "$( basename $0 ) <BRANCH> <BUILD_TYPE> <STREAM> where"
- printf "\t\t%s\t%s\n" "BRANCH:" "BRANCH to build, such as master, R4_2_mainenance, R3_8_maintenance"
- printf "\t\t%s\t%s\n" "BUILD_TYPE:" "M, I, N"
- printf "\t\t%s\t%s\n" "STREAM: " "eclipse release being built, such as 4.3.0, 4.2.2, 3.8.2"
-}
-
-if [[ $# != 3 ]]
-then
- usage
- exit 1
-fi
-
-export BRANCH=${BRANCH:-"${1}"}
-export BUILD_TYPE=${BUILD_TYPE:-"${2}"}
-export STREAM=${STREAM:-"${3}"}
-
-reponame=eclipse.platform.releng.aggregator
-
-# contrary to intuition (and previous behavior, bash 3.1) do NOT use quotes around right side of expression.
-if [[ "${STREAM}" =~ ^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)$ ]]
-then
- export STREAMMajor=${BASH_REMATCH[1]}
- export STREAMMinor=${BASH_REMATCH[2]}
- export STREAMService=${BASH_REMATCH[3]}
-else
- echo "STREAM must contain major, minor, and service versions, such as 4.3.0"
- echo " but found ${STREAM}"
- exit 1
-fi
-
-if [[ ! "${BUILD_TYPE}" =~ [IMNPXY] ]]
-then
- echo "BUILD_TYPE must by I,M, N, P, X, or Y"
- echo " but found ${BUILD_TYPE}"
- exit 1
-fi
-
-# if not defined "externally", we use default for eclipse.org
-if [[ -z $REPO_AND_ACCESS ]]
-then
- # unless we are on 'build' machine
- if [[ "build" == "$(hostname)" ]]
- then
- export REPO_AND_ACCESS=file:///gitroot
- else
- export REPO_AND_ACCESS=git://git.eclipse.org/gitroot
- fi
-fi
-
-
-export BUILD_ROOT=${BUILD_ROOT:-${BUILD_HOME}/${STREAMMajor}${BUILD_TYPE}}
-echo "Exporting production scripts ... "
-echo " STREAM: $STREAM"
-echo " STREAMMajor: $STREAMMajor"
-echo " STREAMMinor: $STREAMMinor"
-echo " STREAMService: $STREAMService"
-echo " BUILD_TYPE: $BUILD_TYPE"
-echo " BUILD_ROOT: $BUILD_ROOT"
-echo " BUILD_HOME: $BUILD_HOME"
-echo " PRODUCTION_SCRIPTS_DIR: $PRODUCTION_SCRIPTS_DIR"
-echo " REPO_AND_ACCESS: $REPO_AND_ACCESS"
-
-# We put these in build_root in case two builds get started at once.
-# (such as N and I build, both from master).
-
-# TODO: could maybe do pull here, if already exists?
-rm -fr $BUILD_ROOT/tmp/eclipse.platform.releng.aggregator 2>/dev/null
-if [[ $? != 0 ]]
-then
- echo "[ERROR] Exiting, since could not remove $BUILD_ROOT/tmp/eclipse.platform.releng.aggregator as expected."
- exit 1
-fi
-
-# Make dir in case first run (note: this must be after the above "removes",
-# or else first time through they will remove this directory itself.
-mkdir -p ${BUILD_ROOT}/tmp
-if [[ $? != 0 ]]
-then
- echo "[ERROR] Exiting, since could not make $BUILD_ROOT/tmp, as expected."
- exit 1
-fi
-
-
-git clone -b ${BRANCH} ${REPO_AND_ACCESS}/platform/eclipse.platform.releng.aggregator $BUILD_ROOT/tmp/eclipse.platform.releng.aggregator
-RC=$?
-if [[ $RC != 0 ]]
-then
- echo "Could not clone repo as expected"
- exit $RC
-fi
-
-#remove any previous production scripts, to make sure completely fresh
-rm -fr $BUILD_ROOT/${PRODUCTION_SCRIPTS_DIR} 2>/dev/null
-
-# cp whole script directory "up" so directly under build_root, in constant place
-cp -r $BUILD_ROOT/tmp/eclipse.platform.releng.aggregator/${PRODUCTION_SCRIPTS_DIR} ${BUILD_ROOT}
-
-if [[ $? != 0 ]]
-then
- echo "Exiting, since could not copy production scripts, as expected."
- exit 1
-fi
-
-chmod +x ${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/*.sh
-
-if [[ $? != 0 ]]
-then
- echo "Could not chmod of production scripts to executable. Running under wrong id?"
- exit 1
-fi
-
diff --git a/bootstrap/description.txt b/bootstrap/description.txt
index 2a314f06..36402210 100644
--- a/bootstrap/description.txt
+++ b/bootstrap/description.txt
@@ -1,10 +1,11 @@
-Thsese files should only exist in 'master'. They should never differ between BRANCHes.
+These files should only exist in 'master'. They should never differ between BRANCHes.
These go in your BUILD_HOME directory (by export/copy or wget) and they are simply to "get things started",
such as via cronjobs, etc. Such as for Platform builds, in /shared/eclipse/builds.
-The bootstrap.sh fle is reponsible for getting all the other scripts that are required,
+The bootstrap.shsource file is responsible for getting all the other scripts
+that are required,
from the right BRANCH, and starting a build for that BRANCH.
They should not have to change often.
diff --git a/bootstrap/mb4I.sh b/bootstrap/mb4I.sh
index c1b4e7ea..c08760c1 100755
--- a/bootstrap/mb4I.sh
+++ b/bootstrap/mb4I.sh
@@ -80,10 +80,6 @@ export PRODUCTION_SCRIPTS_DIR=production
source $BUILD_HOME/bootstrap.shsource
-${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME
+# run rest in "back ground"
+${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME &
-rc=$?
-if [[ $rc != 0 ]]
-then
- echo "BUILD FAILED. See run-maven-build-ouptut.txt." >&2
-fi
diff --git a/bootstrap/mb4M.sh b/bootstrap/mb4M.sh
index c7d1783f..f7b305cf 100755
--- a/bootstrap/mb4M.sh
+++ b/bootstrap/mb4M.sh
@@ -81,10 +81,6 @@ export PRODUCTION_SCRIPTS_DIR=production
source $BUILD_HOME/bootstrap.shsource
-${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME
+${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME &
+
-rc=$?
-if [[ $rc != 0 ]]
-then
- echo "BUILD FAILED. See run-maven-build-ouptut.txt." >&2
-fi
diff --git a/bootstrap/mb4N.sh b/bootstrap/mb4N.sh
index e59a08bf..a7b7f1f5 100755
--- a/bootstrap/mb4N.sh
+++ b/bootstrap/mb4N.sh
@@ -81,10 +81,5 @@ export PRODUCTION_SCRIPTS_DIR=production
source $BUILD_HOME/bootstrap.shsource
-${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME
+${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME &
-rc=$?
-if [[ $rc != 0 ]]
-then
- echo "BUILD FAILED. See run-maven-build-ouptut.txt." >&2
-fi
diff --git a/bootstrap/mb4P.sh b/bootstrap/mb4P.sh
index 078c87a3..ed120adf 100755
--- a/bootstrap/mb4P.sh
+++ b/bootstrap/mb4P.sh
@@ -82,10 +82,4 @@ export PRODUCTION_SCRIPTS_DIR=production
source $BUILD_HOME/bootstrap.shsource
-${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME
-
-rc=$?
-if [[ $rc != 0 ]]
-then
- echo "BUILD FAILED. See run-maven-build-ouptut.txt." >&2
-fi
+${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME &
diff --git a/bootstrap/mb4X.sh b/bootstrap/mb4X.sh
index a7ad409e..8d0da285 100755
--- a/bootstrap/mb4X.sh
+++ b/bootstrap/mb4X.sh
@@ -80,11 +80,4 @@ export PRODUCTION_SCRIPTS_DIR=production
source $BUILD_HOME/bootstrap.shsource
-
-${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME
-
-rc=$?
-if [[ $rc != 0 ]]
-then
- echo "BUILD FAILED. See run-maven-build-ouptut.txt." >&2
-fi
+${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME &
diff --git a/bootstrap/mb4Y.sh b/bootstrap/mb4Y.sh
index 6796860e..de48c391 100755
--- a/bootstrap/mb4Y.sh
+++ b/bootstrap/mb4Y.sh
@@ -84,10 +84,4 @@ export PRODUCTION_SCRIPTS_DIR=production
source $BUILD_HOME/bootstrap.shsource
-${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME
-
-rc=$?
-if [[ $rc != 0 ]]
-then
- echo "BUILD FAILED. See run-maven-build-ouptut.txt." >&2
-fi
+${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/master-build.sh "${BUILD_ROOT}/${PRODUCTION_SCRIPTS_DIR}/build_eclipse_org.shsource" 1>>$LOG_OUT_NAME 2>>$LOG_ERR_NAME &

Back to the top