Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2013-03-06 01:52:34 +0000
committerDavid Williams2013-03-06 01:52:34 +0000
commit902515f6e9a05095e14329c43e3d4f06db24c934 (patch)
tree43002abff8eed344c54ac2de20612b2adc0468ce /production
parent780d1009835c35fa326b1531533ab8ecfd6f7420 (diff)
downloadeclipse.platform.releng.aggregator-902515f6e9a05095e14329c43e3d4f06db24c934.tar.gz
eclipse.platform.releng.aggregator-902515f6e9a05095e14329c43e3d4f06db24c934.tar.xz
eclipse.platform.releng.aggregator-902515f6e9a05095e14329c43e3d4f06db24c934.zip
[releng] bullet proof promote script
Diffstat (limited to 'production')
-rwxr-xr-xproduction/sdk/promotion/syncDropLocation.sh9
-rw-r--r--production/sdk/promotion/syncUpdateUtils.shsource14
2 files changed, 17 insertions, 6 deletions
diff --git a/production/sdk/promotion/syncDropLocation.sh b/production/sdk/promotion/syncDropLocation.sh
index 8a757d917..7fb1dd457 100755
--- a/production/sdk/promotion/syncDropLocation.sh
+++ b/production/sdk/promotion/syncDropLocation.sh
@@ -200,9 +200,14 @@ function syncRepoSite ()
toDir=$(updateSiteOnDL "$eclipseStream" "$buildId" "$BUILD_TECH")
#toDir="/home/data/httpd/download.eclipse.org/eclipse/updates/4.3-builds"
+ if [[ -n "${fromDir}" && -d "${fromDir}" && -n "${toDir}" && -d "${toDir}" ]]
+ then
+ rsync --recursive "${fromDir}" "${toDir}"
+ RC=$?
+ else
+ RC=9
+ fi
- rsync --recursive "${fromDir}" "${toDir}"
- RC=$?
if [[ $RC != 0 ]]
then
echo "ERROR: rsync failed. RC: $RC" >&2
diff --git a/production/sdk/promotion/syncUpdateUtils.shsource b/production/sdk/promotion/syncUpdateUtils.shsource
index 6ec86a2fd..c2cd1b294 100644
--- a/production/sdk/promotion/syncUpdateUtils.shsource
+++ b/production/sdk/promotion/syncUpdateUtils.shsource
@@ -151,7 +151,7 @@ function updateSiteOnBuildDir()
# Rest of scripts stay common
# Eventually, we might put in some mirror/comparator tasks (just as sanity check on new build ... should be impossible since new build does that early-on?)
# and mirror in EMF too? Here for now, POM later?
- #
+ # TODO: we are doing this important "side effect" of finding "fromDir" name. Should pull up.
# full form is simiilar to
# ${buildRoot}/${BRANCH}/gitCache/eclipse.platform.releng.aggregator/eclipse.platform.repository/target/repository.
# If things are as expected, there can be only one, but we put in head -1 for good form,
@@ -160,9 +160,10 @@ function updateSiteOnBuildDir()
echo "INFO: original source dir: $sdir" >&2
# make posiitive ${sdir} is not empty, or we are basically copying
# all of root! (and, sdir is empty if we had a failed build!)
- if [[ ! -z "${sdir}" && -d "${sdir}" ]]
+ if [[ -n "${sdir}" && -d "${sdir}" && -n "${fromDir}" && -d "${fromDir}" ]]
then
rsync -vr "${sdir}/" "${fromDir}/" >&2
+ if [[ $? != 0 ]] ; then return $? fi
fi
elif [[ "${BUILD_TECH}" == 'PDE' ]]
then
@@ -370,8 +371,13 @@ function syncDropLocation ()
# would be more accurate for mirroring system to have
# actual times (and we are copying only one specific
# sub-sirectory) (But, we do for now, for easier testing)
- rsync --recursive --exclude="*org.eclipse.releng.basebuilder*" --exclude="*eclipse.platform.releng.aggregator*" "${fromDir}" "${toDir}"
- rccode=$?
+ if [[ -n "${fromDir}" && -d "${fromDir}" && -n "${toDir}" && -d "${toDir}"]]
+ then
+ rsync --recursive --exclude="*org.eclipse.releng.basebuilder*" --exclude="*eclipse.platform.releng.aggregator*" "${fromDir}" "${toDir}"
+ rccode=$?
+ else
+ rccode=9
+ fi
if [[ $rccode != 0 ]]
then
echo "ERROR: rsync did not complete normally.rccode: $rccode"

Back to the top