diff options
author | David Williams | 2015-10-07 20:47:44 +0000 |
---|---|---|
committer | David Williams | 2015-10-07 20:47:44 +0000 |
commit | bfa022e984b7e96ec53e70497900c39ce4e79d7d (patch) | |
tree | 69c78298ae9091c4bdad911d2d88411cb2524108 /production/getEBuilderForDropDir.sh | |
parent | 20f5a31a15fc26f5ca413275b48a997f318e2991 (diff) | |
download | eclipse.platform.releng.aggregator-bfa022e984b7e96ec53e70497900c39ce4e79d7d.tar.gz eclipse.platform.releng.aggregator-bfa022e984b7e96ec53e70497900c39ce4e79d7d.tar.xz eclipse.platform.releng.aggregator-bfa022e984b7e96ec53e70497900c39ce4e79d7d.zip |
Bug 479191 - getEBuilderForDropDir.sh does not get correct branch
Diffstat (limited to 'production/getEBuilderForDropDir.sh')
-rwxr-xr-x | production/getEBuilderForDropDir.sh | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/production/getEBuilderForDropDir.sh b/production/getEBuilderForDropDir.sh index 0661caa31..32bffd50b 100755 --- a/production/getEBuilderForDropDir.sh +++ b/production/getEBuilderForDropDir.sh @@ -39,7 +39,14 @@ gitCache=$( fn-git-cache "$BUILD_ROOT") aggDir=$( fn-git-dir "$gitCache" "$AGGREGATOR_REPO" ) RC=0 + # don't clone, if already exists. +# TODO: could do more error checking, if hash is what we expect, +# if the zip file already exists. But 99.99% sure all is fine, +# if this directory already exists. Might be an issue in resuming +# a failed build, without cleaning everything first? (Which we currently +# do not do.) Even then, might be best to delete everything, including +# the zip, and re-clone. It is, after all, a detached head. if [[ ! -d ${BUILD_DIR}/${EBUILDER} ]] then # Not sure 'REPO_AND_ACCESS' is defined in all possible scenarios, so we'll provide a default. @@ -60,38 +67,30 @@ then echo "[ERROR] Cloning EBUILDER returned non zero return code: $RC" exit $RC fi -fi -echo "INFO: ebuilder directory cloned or found to exist." -echo "INFO: Location: ${BUILD_DIR}/${EBUILDER}" -echo "INFO: fetching to make sure up to date," -echo "INFO: before checking out specific HASH (which will make it detached)." -pushd ${BUILD_DIR}/${EBUILDER} -git fetch -RC=$? -if [[ $RC != 0 ]] -then - echo "[ERROR] Fetch EBUILDER returned non zero return code: $RC" - exit $RC -fi -git checkout $EBUILDER_HASH -RC=$? -if [[ $RC != 0 ]] -then - echo "[ERROR] Checking out EBUILDER for $EBUILDER_HASH returned non zero return code: $RC" - exit $RC -fi -popd -# prepare a (small) zip, for easy retrieval of "production" files, during unit tests on Hudson. -# This basic function used to be provided by CGit, but was turned off for "snapshots" of commits, -# and was a bit overkill for those doing their own "remote" test builds (or tests). -# This small zip is stored, unadvertised, on download site, and retrieved as part of the -# Hudson test "bootstrap". The "production" directory in general, though, is also -# used during the build itself. -# (hard to know "where" we are at ... so we'll make sure. -printf "\n\tDEBUG: %s\n" "About to create EBuilder zip: ${EBUILDER}-${EBUILDER_HASH}.zip" -pushd ${buildDirectory} -zip -r "${buildDirectory}/${EBUILDER}-${EBUILDER_HASH}.zip" "${EBUILDER}/production/testScripts" -popd -exit $RC + echo "INFO: ebuilder directory cloned. + echo "INFO: Location: ${BUILD_DIR}/${EBUILDER}" + echo "INFO: checking out specific HASH (which will make it detached)." + pushd ${BUILD_DIR}/${EBUILDER} + git checkout $EBUILDER_HASH + RC=$? + if [[ $RC != 0 ]] + then + echo "[ERROR] Checking out EBUILDER for $EBUILDER_HASH returned non zero return code: $RC" + exit $RC + fi + popd + # prepare a (small) zip, for easy retrieval of "production" files, during unit tests on Hudson. + # This basic function used to be provided by CGit, but was turned off for "snapshots" of commits, + # and was a bit overkill for those doing their own "remote" test builds (or tests). + # This small zip is stored, unadvertised, on download site, and retrieved as part of the + # Hudson test "bootstrap". The "production" directory in general, though, is also + # used during the build itself. + # (hard to know "where" we are at ... so we'll make sure. + printf "\n\tDEBUG: %s\n" "About to create EBuilder zip: ${EBUILDER}-${EBUILDER_HASH}.zip" + pushd ${buildDirectory} + zip -r "${buildDirectory}/${EBUILDER}-${EBUILDER_HASH}.zip" "${EBUILDER}/production/testScripts" + popd + exit $RC +fi |