diff options
author | David Williams | 2013-01-26 21:47:24 +0000 |
---|---|---|
committer | David Williams | 2013-01-26 21:47:24 +0000 |
commit | 1de7a5622c316dd9182f238cc1aafa8ab5483fca (patch) | |
tree | 7c4e92e2118bb94c94f4c04240cdc9296e93ee7e /scripts | |
parent | e0fba1d9be95e934486654e4e7ec1eb8e7dca2d0 (diff) | |
download | eclipse.platform.releng.aggregator-1de7a5622c316dd9182f238cc1aafa8ab5483fca.tar.gz eclipse.platform.releng.aggregator-1de7a5622c316dd9182f238cc1aafa8ab5483fca.tar.xz eclipse.platform.releng.aggregator-1de7a5622c316dd9182f238cc1aafa8ab5483fca.zip |
Bug 393927 - [CBI] Generate Deployable build directory (prep)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/master-build.sh | 4 | ||||
-rw-r--r-- | scripts/promote-build.sh | 54 | ||||
-rw-r--r-- | scripts/publish-eclipse.sh | 3 |
3 files changed, 47 insertions, 14 deletions
diff --git a/scripts/master-build.sh b/scripts/master-build.sh index 230964630..ba7bcc88a 100644 --- a/scripts/master-build.sh +++ b/scripts/master-build.sh @@ -134,5 +134,5 @@ $SCRIPT_PATH/publish-eclipse.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/publis checkForErrorExit $? "Error occurred during publish-eclipse" # if all ended well, put "promotion scripts" in known locations -#$SCRIPT_PATH/promote-build.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/promote-build-ouptut.txt -#checkForErrorExit $? "Error occurred during promote-build" +$SCRIPT_PATH/promote-build.sh CBI $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/promote-build-ouptut.txt +checkForErrorExit $? "Error occurred during promote-build" diff --git a/scripts/promote-build.sh b/scripts/promote-build.sh index 6d210f497..320616a67 100644 --- a/scripts/promote-build.sh +++ b/scripts/promote-build.sh @@ -6,6 +6,39 @@ # a different user id must promote things to "downloads". The promotion scripts # also trigger the unit tests on Hudson. +function usage () +{ + printf "\n\n\t%s\n" "promote-build.sh (PDE|CBI) if none specified, PDE assumed" +} + +BUILD_TECH=$1 +if [[ -z "$BUILD_TECH" ]] + then + BUILD_TECH=PDE + fi + +case $BUILD_TECH in + + 'PDE' ) + echo "promote PDE build" + ;; + + 'CBI' ) + echo "promote CBI build" + # always assume true, for now, until debugged + testbuildonly=true; + ;; + *) echo "ERROR: Invalid argument to $(basename $0)"; + usage; + exit 1 + ;; +esac + + +source $SCRIPT_PATH/build-functions.sh + +source "$2" + # The 'workLocation' provides a handy central place to have the # promote script, and log results. ASSUMING this works for all @@ -19,10 +52,8 @@ promoteScriptLocationEclipse=$workLocation/queue # directory should normally exist -- best to create first, with committer's ID -- # but in case not mkdir -p "${promoteScriptLocationEclipse}" - -#always use TEST for now -testbuildonly=true -scriptName=promote-${eclipseStream}-${buildId}.sh +env > env.txt +scriptName=promote-${STREAM}-${BUILD_ID}.sh if [[ "${testbuildonly}" == "true" ]] then # allows the "test" creation of promotion script, but, not have it "seen" be cron job @@ -32,7 +63,8 @@ fi ptimestamp=$( date +%Y%m%d%H%M ) echo "#!/usr/bin/env bash" > ${promoteScriptLocationEclipse}/${scriptName} echo "# promotion script created at $ptimestamp" >> ${promoteScriptLocationEclipse}/${scriptName} -echo "$workLocation/syncDropLocation.sh $eclipseStream $buildId" >> ${promoteScriptLocationEclipse}/${scriptName} +# TODO: changed "syncDropLocation" to handle a third parameter (CBI or PDE) +echo "$workLocation/syncDropLocation.sh $STREAM $BUILD_ID $BUILD_TECH" >> ${promoteScriptLocationEclipse}/${scriptName} # we restrict "others" rights for a bit more security or safety from accidents chmod -v ug=rwx,o-rwx ${promoteScriptLocationEclipse}/${scriptName} @@ -40,7 +72,7 @@ chmod -v ug=rwx,o-rwx ${promoteScriptLocationEclipse}/${scriptName} # no need to promote anything for 3.x builds # (equinox portion should be the same, so we will # create for equinox for for only 4.x primary builds) -if [[ $eclipseStream > 4 ]] +if [[ $STREAM > 4 ]] then # The 'workLocation' provides a handy central place to have the # promote script, and log results. ASSUMING this works for all @@ -56,9 +88,13 @@ then mkdir -p "${promoteScriptLocationEquinox}" eqFromDir=${equinoxPostingDirectory}/${buildId} - # fake location, for now - eqToDir="/shared/eclipse/temp/eqdrops" - #eqToDir="/home/data/httpd/download.eclipse.org/equinox/drops/" + if [[ "$BUILD_TECH" == 'PDE' ]] + then + eqToDir="/home/data/httpd/download.eclipse.org/equinox/drops/" + else + # TODO temp location, for now + eqToDir="/shared/eclipse/temp/download.eclipse.org/equinox/drops/" + fi # Note: for proper mirroring at Eclipse, we probably do not want/need to # maintain "times" on build machine, but let them take times at time of copying. diff --git a/scripts/publish-eclipse.sh b/scripts/publish-eclipse.sh index 0bc5cbd16..cd946b4f4 100644 --- a/scripts/publish-eclipse.sh +++ b/scripts/publish-eclipse.sh @@ -45,7 +45,4 @@ fn-parse-compile-logs "$BUILD_ID" \ "$aggDir"/eclipse.platform.releng.tychoeclipsebuilder/eclipse/helper.xml \ "$buildDirectory" "$launcherJar" -# TODO Not sure this file is needed? -touch "$buildDirectory"/directory.txt - fn-publish-eclipse "$BUILD_TYPE" "$STREAM" "$BUILD_ID" "$aggDir" "$buildDirectory" "$launcherJar" |