From ee273bb0db14e49455d2cb2dd45c84a75bb6df96 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sat, 16 Mar 2013 00:10:11 -0400 Subject: [releng] fix promote scripts for N builds --- production/sdk/promotion/runAntRunner.sh | 31 ++++++++++++++++++----- production/sdk/promotion/syncDropLocation.sh | 2 +- production/sdk/promotion/syncUpdateUtils.shsource | 7 +---- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/production/sdk/promotion/runAntRunner.sh b/production/sdk/promotion/runAntRunner.sh index 73a01dc78..df11ed0cc 100755 --- a/production/sdk/promotion/runAntRunner.sh +++ b/production/sdk/promotion/runAntRunner.sh @@ -21,11 +21,29 @@ then fi shift +eclipseStream=$1 +if [[ -z "${eclipseStream}" ]] +then + echo "This script requires eclipseStream as input." + echo " For example, $( basename $0 ) I20130306-0033 4.3.0" + exit 1 +fi +shift + +eclipseStreamMajor=${eclipseStream:0:1} +buildType=${buildId:0:1} + BUILD_HOME=${BUILD_HOME:-/shared/eclipse/builds} -# TODO: make stream sensitive -BUILD_ROOT=${BUILD_ROOT:-${BUILD_HOME}/4I} -# TODO: make stream sensitive -basebuilderParent=${BUILD_ROOT}/siteDir/eclipse/downloads/drops4/${buildId} + +BUILD_ROOT=${BUILD_ROOT:-${BUILD_HOME}/${eclipseStreamMajor}${buildType}} + +dropSegment=drops +if [[ ${eclipseStreamMajor} > 3 ]] +then + dropSegment=drops${eclipseStreamMajor} +fi + +basebuilderParent=${BUILD_ROOT}/siteDir/eclipse/downloads/${dropSegment}/${buildId} if [[ ! -d "${basebuilderParent}" ]] then echo "ERROR: The directory did not exist. Must name existing directory where basebuilder is, or will be installed." @@ -33,8 +51,8 @@ then exit 1 fi -# TODO: we could call/check install basebuilder here, but not required for -# immediate use case of using to composite repos. +# TODO: we could check basebuilder here and if not, install it? +# but not required for immediate use case of using to composite repos. baseBuilderDir=${basebuilderParent}/org.eclipse.releng.basebuilder if [[ ! -d "${baseBuilderDir}" ]] @@ -91,6 +109,7 @@ devArgs=-Xmx256m echo echo " buildId: ${buildId}" +echo " buildId: ${eclipseStream}" echo " basebuilderParent: ${basebuilderParent}" echo " baseBuilderDir: ${baseBuilderDir}" echo " launcherJar: ${launcherJar}" diff --git a/production/sdk/promotion/syncDropLocation.sh b/production/sdk/promotion/syncDropLocation.sh index e1fbb1296..6fae9b201 100755 --- a/production/sdk/promotion/syncDropLocation.sh +++ b/production/sdk/promotion/syncDropLocation.sh @@ -232,7 +232,7 @@ function syncRepoSite () ant -f ${SCRIPTDIR}/getBaseBuilder.xml -DWORKSPACE=$dropFromBuildDir fi -${SCRIPTDIR}/runAntRunner.sh ${buildId} ${SCRIPTDIR}/addToComposite.xml addToComposite -Drepodir=${toDir} -Dcomplocation=${buildId} +${SCRIPTDIR}/runAntRunner.sh ${buildId} ${eclipseStream} ${SCRIPTDIR}/addToComposite.xml addToComposite -Drepodir=${toDir} -Dcomplocation=${buildId} RC=$? return $RC } diff --git a/production/sdk/promotion/syncUpdateUtils.shsource b/production/sdk/promotion/syncUpdateUtils.shsource index f3e1172f3..86ae2dd7f 100644 --- a/production/sdk/promotion/syncUpdateUtils.shsource +++ b/production/sdk/promotion/syncUpdateUtils.shsource @@ -213,12 +213,7 @@ function dropFromBuildDir () siteDir=${buildRoot}/siteDir - if [[ "${BUILD_TECH}" == 'CBI' ]] - then - fromDir=${siteDir}/${pathFromDL}/${buildId} - else - fromDir=${siteDir}/${pathFromDL}/${buildId} - fi + fromDir=${siteDir}/${pathFromDL}/${buildId} echo "$fromDir" -- cgit v1.2.3