From 4b1bf1fe656fb2e13276038fb6da80f138721f1d Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Tue, 9 Mar 2010 15:32:13 -0800 Subject: [PATCH] Factor out nightly build portion of CI script so not all branches push builds --- Tools/Scripts/ci-extra-nightlies.sh | 10 ++++++++++ Tools/Scripts/ci.sh | 19 ++++++++----------- Tools/Scripts/cruise_config.rb | 6 ++++++ 3 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 Tools/Scripts/ci-extra-nightlies.sh create mode 100644 Tools/Scripts/cruise_config.rb diff --git a/Tools/Scripts/ci-extra-nightlies.sh b/Tools/Scripts/ci-extra-nightlies.sh new file mode 100644 index 000000000..b0726ab50 --- /dev/null +++ b/Tools/Scripts/ci-extra-nightlies.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +PACKAGE_BRANCH="nightly" jake push-packages +code=$? +if [ $code -ne 0 ]; then + echo "NIGHTLY BUILD PUSH FAILED ($code)" + exit $code +else + echo "NIGHTLY BUILD PUSH SUCCEEDED" +fi diff --git a/Tools/Scripts/ci.sh b/Tools/Scripts/ci.sh index 1500cc2fa..a3a93eae5 100755 --- a/Tools/Scripts/ci.sh +++ b/Tools/Scripts/ci.sh @@ -1,11 +1,12 @@ #!/bin/bash project_home="$(dirname "$PWD")" +extras = "$project_home/ci-extra.sh" export PATH="$HOME/narwhal/bin:$PATH" export CAPP_AUTO_UPGRADE="yes" -export CAPP_BUILD=$project_home/build_incremental +export CAPP_BUILD="$project_home/build_incremental" time jake test code=$? if [ $code -ne 0 ]; then @@ -15,8 +16,8 @@ else echo "INCREMENTAL BUILD SUCCEEDED" fi -export CAPP_BUILD=$project_home/build_clean -rm -rf $CAPP_BUILD +export CAPP_BUILD="$project_home/build_clean" +rm -rf "$CAPP_BUILD" time jake CommonJS test code=$? @@ -27,13 +28,9 @@ else echo "CLEAN BUILD SUCCEEDED" fi -PACKAGE_BRANCH="nightly" jake push-packages -code=$? -if [ $code -ne 0 ]; then - echo "NIGHTLY BUILD PUSH FAILED ($code)" - exit $code -else - echo "NIGHTLY BUILD PUSH SUCCEEDED" +# run any additional ci commands not common to all branches (like nightly builds) +if [ -f "$extras" ]; then + source "$extras" fi -exit 0 \ No newline at end of file +exit 0 diff --git a/Tools/Scripts/cruise_config.rb b/Tools/Scripts/cruise_config.rb new file mode 100644 index 000000000..17c14a20d --- /dev/null +++ b/Tools/Scripts/cruise_config.rb @@ -0,0 +1,6 @@ +Project.configure do |project| + + project.email_notifier.emails = ['objjbuild@googlegroups.com'] + project.build_command = 'Tools/Scripts/ci.sh' + +end