Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2013-01-24 18:29:06 -0500
committerDavid Williams2013-01-24 18:29:06 -0500
commit6fa14308e7ece2bfd7d397e9fdc88ceae5cfc9bf (patch)
tree35525bf6a13c588bba03d5567726f88accbb4364 /scripts
parent20e0471fcb106df86eb64418c22a8e92c1ae42f0 (diff)
downloadeclipse.platform.releng.aggregator-6fa14308e7ece2bfd7d397e9fdc88ceae5cfc9bf.tar.gz
eclipse.platform.releng.aggregator-6fa14308e7ece2bfd7d397e9fdc88ceae5cfc9bf.tar.xz
eclipse.platform.releng.aggregator-6fa14308e7ece2bfd7d397e9fdc88ceae5cfc9bf.zip
remove jarprocessor from DL pages/templates
Diffstat (limited to 'scripts')
-rw-r--r--scripts/master-build.sh6
-rw-r--r--scripts/promote-build.sh85
2 files changed, 89 insertions, 2 deletions
diff --git a/scripts/master-build.sh b/scripts/master-build.sh
index 81578e40..719d563f 100644
--- a/scripts/master-build.sh
+++ b/scripts/master-build.sh
@@ -130,7 +130,9 @@ checkForErrorExit $? "Error occurred during gather parts"
$SCRIPT_PATH/parse-logs.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/parse-logs-ouptut.txt
$checkForErrorExit $? "Error occurred during parse-logs"
-/bin/bash $SCRIPT_PATH/publish-eclipse.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/publish-eclipse-ouptut.txt
+$SCRIPT_PATH/publish-eclipse.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/publish-eclipse-ouptut.txt
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"
diff --git a/scripts/promote-build.sh b/scripts/promote-build.sh
new file mode 100644
index 00000000..6d210f49
--- /dev/null
+++ b/scripts/promote-build.sh
@@ -0,0 +1,85 @@
+#!/usr/bin/env bash
+
+# Utility to trigger the promotion of build. This utility just creates
+# a file to be executed by cron job. The actual promotion is done by files
+# in sdk directory of build machine. This "cron job approach" is required since
+# a different user id must promote things to "downloads". The promotion scripts
+# also trigger the unit tests on Hudson.
+
+
+# The 'workLocation' provides a handy central place to have the
+# promote script, and log results. ASSUMING this works for all
+# types of builds, etc (which is the goal for the sdk promotions).
+workLocation=/shared/eclipse/sdk/promotion
+
+# the cron job must know about and use this same
+# location to look for its promotions scripts. (i.e. implicite tight coupling)
+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
+if [[ "${testbuildonly}" == "true" ]]
+then
+ # allows the "test" creation of promotion script, but, not have it "seen" be cron job
+ scriptName=TEST-$scriptName
+fi
+# Here is content of promtion script:
+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}
+
+# we restrict "others" rights for a bit more security or safety from accidents
+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 ]]
+then
+ # The 'workLocation' provides a handy central place to have the
+ # promote script, and log results. ASSUMING this works for all
+ # types of builds, etc (which is the goal for the sdk promotions).
+ workLocationEquinox=/shared/eclipse/equinox/promotion
+
+ # the cron job must know about and use this same
+ # location to look for its promotions scripts. (i.e. tight coupling)
+ promoteScriptLocationEquinox=${workLocationEquinox}/queue
+
+ # directory should normally exist -- best to create with committer's ID --
+ # but in case not
+ mkdir -p "${promoteScriptLocationEquinox}"
+
+ eqFromDir=${equinoxPostingDirectory}/${buildId}
+ # fake location, for now
+ eqToDir="/shared/eclipse/temp/eqdrops"
+ #eqToDir="/home/data/httpd/download.eclipse.org/equinox/drops/"
+
+ # 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.
+ # If it turns out to be important to maintain times (such as ran more than once,
+ # to pick up a "more" output, such as test results, then add -t to rsync
+ # Similarly, if download server is set up right, it will end up with the
+ # correct permissions, but if not, we may need to set some permissions first,
+ # then use -p on rsync
+
+ # Here is content of promtion script (note, use same ptimestamp created above):
+ echo "#!/usr/bin/env bash" > ${promoteScriptLocationEquinox}/${scriptName}
+ echo "# promotion script created at $ptimestamp" > ${promoteScriptLocationEquinox}/${scriptName}
+ echo "rsync --recursive \"${eqFromDir}\" \"${eqToDir}\"" >> ${promoteScriptLocationEquinox}/${scriptName}
+
+ # we restrict "others" rights for a bit more security or safety from accidents
+ chmod -v ug=rwx,o-rwx ${promoteScriptLocationEquinox}/${scriptName}
+else
+ echo "Did not create promote script for equinox since $eclipseStream less than 4"
+fi
+
+
+echo "normal exit from build phase of $(basename $0)"
+
+exit 0

Back to the top