Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--production/bootstrapVariables.shsource10
-rwxr-xr-xproduction/sdk/bootstrap/mb4N_hudson.sh1
2 files changed, 8 insertions, 3 deletions
diff --git a/production/bootstrapVariables.shsource b/production/bootstrapVariables.shsource
index d8145b03..9e878a6c 100644
--- a/production/bootstrapVariables.shsource
+++ b/production/bootstrapVariables.shsource
@@ -14,12 +14,18 @@
# boot strap basic variable values, to drive Eclipse Platform builds.
# we set RAWDATE first thing, just to make it more accurate of "start of build"
+# we have found on Hudson that by the time the build starts, it is already 1 minute
+# past the time we requested. While this may eventually be fixed in Hudson (follow bug 496403),
+# in the meantime we will use a simple heuristic and deduct 60 from the RAWDATE we obtain, and then
+# use that new value through out. If this ever needs to be improved (for example, some builds start to
+# look like that started at 59 minutes past the hour, then the heuristic will need to be more
+# sophisticated. See bug 496345.
if [[ -z "${RAWDATE}" ]]
then
- echo -e "\n\t[DEBUG] RAWDATE, in bootstrapVariables, was empty, so setting to ${RAWDATE}\n"
RAWDATE=$( date +%s )
+ RAWDATE=$((RAWDATE - 60))
export RAWDATE
- echo -e "\n\t[DEBUG] RAWDATE, in bootstrapVariables, was empty, so setting to ${RAWDATE}\n"
+ echo -e "\n\t[DEBUG] RAWDATE in ${0##*/} was empty (as expected) so setting to \"now\", ${RAWDATE}\n"
fi
if [[ -z "${SCRIPT_PATH}" ]]
then
diff --git a/production/sdk/bootstrap/mb4N_hudson.sh b/production/sdk/bootstrap/mb4N_hudson.sh
index bcee2415..dc8bb3d3 100755
--- a/production/sdk/bootstrap/mb4N_hudson.sh
+++ b/production/sdk/bootstrap/mb4N_hudson.sh
@@ -112,7 +112,6 @@ else
export RUNNING_ON_HUDSON=true
fi
echo -e "\n\t[INFO] RUNNING_ON_HUDSON: $RUNNING_ON_HUDSON"
-echo -e "\n\t[DEBUG] RAWDATE in mb4N_hudson was: $RAWDATE\n"
# To allow this cron job to work from hudson, or traditional crontab
if [[ -z "${WORKSPACE}" ]]

Back to the top