diff options
| author | David Williams | 2013-02-13 06:35:28 +0000 |
|---|---|---|
| committer | David Williams | 2013-02-13 06:35:28 +0000 |
| commit | 1b85b4aeb9c4b619d92b5bdd7236ac7141b368aa (patch) | |
| tree | 9b2406afa127077bb35e0f413d7fce5fdb104fa7 | |
| parent | ce1d5f783b3c70dffb352633524108ceb6148863 (diff) | |
| download | eclipse.platform.releng.aggregator-1b85b4aeb9c4b619d92b5bdd7236ac7141b368aa.tar.gz eclipse.platform.releng.aggregator-1b85b4aeb9c4b619d92b5bdd7236ac7141b368aa.tar.xz eclipse.platform.releng.aggregator-1b85b4aeb9c4b619d92b5bdd7236ac7141b368aa.zip | |
Bug 400633 - Need to exit build on (bad) errors and send mail
| -rw-r--r-- | production/build-functions.sh | 2 | ||||
| -rw-r--r-- | production/master-build.sh | 11 | ||||
| -rw-r--r-- | production/run-maven-build.sh | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/production/build-functions.sh b/production/build-functions.sh index 6e5c0ee25..a61671659 100644 --- a/production/build-functions.sh +++ b/production/build-functions.sh @@ -333,7 +333,9 @@ fn-maven-build-aggregator () clean install \ -Dmaven.test.skip=true \ -Dmaven.repo.local=$LOCAL_REPO + rc=$? popd + return $rc } # USAGE: fn-submodule-checkout BUILD_ID REPO_DIR REPOSITORIES_TXT diff --git a/production/master-build.sh b/production/master-build.sh index 7ba00fa4b..2bd0125bf 100644 --- a/production/master-build.sh +++ b/production/master-build.sh @@ -145,7 +145,14 @@ $SCRIPT_PATH/pom-version-updater.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/po checkForErrorExit $? "Error occurred during pom version updater" $SCRIPT_PATH/run-maven-build.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/run-maven-build-ouptut.txt -checkForErrorExit $? "Error occurred during run maven build" +buildrc=$? +if [[ $buildrc != 0 ]] +then + # TODO: eventually put in more logic to "track" the failure, so + # proper actions and emails can be sent. For example, we'd still want to + # publish what we have, but not start the tests. + echo "BUILD FAILED. See run-maven-build-ouptut.txt. +fi $SCRIPT_PATH/gather-parts.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/gather-parts-ouptut.txt checkForErrorExit $? "Error occurred during gather parts" @@ -165,3 +172,5 @@ fn-write-property-close # dump ALL environment variables in case its helpful in documenting or # debugging build results or differences between runs, especially on different machines env 2>&1 | tee $logsDirectory/all-env-variables.txt + +exit $buildrc diff --git a/production/run-maven-build.sh b/production/run-maven-build.sh index d098f1c26..c13e555e3 100644 --- a/production/run-maven-build.sh +++ b/production/run-maven-build.sh @@ -40,4 +40,6 @@ fi fn-maven-cbi-install "$aggDir" "$LOCAL_REPO" fn-maven-parent-install "$aggDir" "$LOCAL_REPO" -fn-maven-build-aggregator "$BUILD_ID" "$aggDir" "$LOCAL_REPO" $COMPARATOR $SIGNING $UPDATE_BRANDING $MAVEN_BREE +buildresult=$( fn-maven-build-aggregator "$BUILD_ID" "$aggDir" "$LOCAL_REPO" $COMPARATOR $SIGNING $UPDATE_BRANDING $MAVEN_BREE ) + +exit $buildresult
\ No newline at end of file |
