tb/config-sample/config | 27 ++---- tb/config-sample/profiles/master_gerrit/autogen.lastrun | 1 tb/config-sample/profiles/master_gerrit/config | 24 +++++ tb/config-sample/profiles/tb99/branches/master/autogen.lastrun_gerrit | 1 tb/config-sample/profiles/tb99/branches/master/autogen.lastrun_tb | 1 tb/config-sample/profiles/tb99/branches/master/config_gerrit | 3 tb/config-sample/profiles/tb99/branches/master/config_tb | 4 tb/config-sample/profiles/tb99/config | 11 -- tb/tb_internals.sh | 45 +++------- 9 files changed, 48 insertions(+), 69 deletions(-)
New commits: commit d8c2480a97d53b47d1d7ed87184d391f88913905 Author: Norbert Thiebaud <[email protected]> Date: Sat Jun 29 20:23:45 2013 -0500 tb detect bad git pull for gerrit diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh index de7b44d..4d00445 100644 --- a/tb/tb_internals.sh +++ b/tb/tb_internals.sh @@ -230,25 +230,6 @@ epoch_from_utc() date -u '+%s' -d "$utc UTC" } - -# -# Fetch a gerrit changeset and check it out -# -fetch_gerrit() -{ - GERRIT_PREV_B=`git branch | grep '^\*' | sed 's/^..//' | sed 's/\//_/g'` - [ $V ] && echo "fetching gerrit path from ssh://${TB_GERRIT_HOST?}/core ${GERRIT_TASK_REF?}" - git fetch -q ssh://${TB_GERRIT_HOST?}/core ${GERRIT_TASK_REF?} - if [ "$?" != "0" ] ; then - retval="3" - else - git checkout -q FETCH_HEAD || die "fatal error checking out gerrit ref" - git submodule -q update - [ $V ] && echo "fetched gerrit path from ssh://${TB_GERRIT_HOST?}/core ${GERRIT_TASK_REF?}" - retval="0" - fi -} - find_dev_install_location() { find . -name opt -type d @@ -362,18 +343,18 @@ prepare_git_repo_for_gerrit() [ $V ] && echo "fetching gerrit path from ssh://${TB_GERRIT_HOST?}/core ${GERRIT_TASK_REF?}" ( - git clean -fd && git fetch -q ssh://${TB_GERRIT_HOST?}/core ${GERRIT_TASK_REF} + git clean -fd && git fetch ssh://${TB_GERRIT_HOST?}/core ${GERRIT_TASK_REF} if [ "$?" = "0" ] ; then - git checkout -q FETCH_HEAD - git submodule -q update + git checkout FETCH_HEAD || exit -1 + git submodule update else exit -1 fi ) 2>&1 > ${TB_BUILD_DIR}/error_log.log if [ "$?" != "0" ] ; then - report_error owner "$(print_date)" error_log.log - die "Cannot reposition repo ${TB_GIT_DIR?} to the proper branch" + log_msgs "Error checkout out ${GERRIT_TASK_TICKET?}" + R=2; fi } @@ -801,15 +782,17 @@ run_gerrit_task() # branch and checkout the target sha prepare_git_repo_for_gerrit - # gerrit build are not incremental - # always use all the phases - local phase_list="autogen clean make test push" + # if prepare repor failed R is no 0 anymore + if [ "${R}" == 0 ] ; then + # gerrit build are not incremental + # always use all the phases + local phase_list="autogen clean make test push" - pushd ${TB_BUILD_DIR?} > /dev/null || die "Cannot cd to build dir : ${TB_BUILD_DIR?}" - - # run the build - do_build ${phase_list?} + pushd ${TB_BUILD_DIR?} > /dev/null || die "Cannot cd to build dir : ${TB_BUILD_DIR?}" + # run the build + do_build ${phase_list?} + fi # tell teh gerrit buildbot of the result of the build # R contain the overall result report_gerrit commit 3c2b3a3d92d7582e3abc48c9ce63566e422f2731 Author: Norbert Thiebaud <[email protected]> Date: Sat Jun 29 20:23:25 2013 -0500 tb: update the doc/template diff --git a/tb/config-sample/config b/tb/config-sample/config index 0bdd69d..fa4663c 100644 --- a/tb/config-sample/config +++ b/tb/config-sample/config @@ -3,7 +3,7 @@ # see see http://wiki/documentfoundation.org/Development/Tinderbox # for naming convention # Note: @99 below is the tinderbox id. in oder to do gerrit -# build you _must_ obtain a BuilbBot user assocaited with that id +# build you _must_ obtain a BuilbBot user associated with that id # see your friendly gerrit admin. TB_NAME="Linux_x86_64@99-Template-Description" @@ -13,28 +13,18 @@ TB_POOL_DELAY=120 # this is the time tb will go to sleep after each build attempt (in seconds) TB_POST_BUILD_DELAY=15 -# location where tb will put the metadata used to follow the state of a 'branche' -# this contain work file that folow the last checkout point, -# the last success point etc... -# these are small files, with overall low activity, so there is no particular requirement -# but they need to persist, so do not put them in /tmp or any other -# place that won't survive a reboot -TB_METADATA_DIR=~/.tb/meta +# location of the global log file for tb +# this file will contain log entry wrt to tasks performed by tb +TB_LOGIFLE=/lo/tb99.log # default email mode when doing a tb build # while debugggin your set-up you probably want =owner or =none here TB_SEND_MAIL=all -# default profile -# tb always run based on a given 'profile' -# this is specified onthe command line by -p <profile> -# this provide a default value in case the information -# is absenct from the command line -# on an establish tinderbox, it would be expected than -# running just 'tb' without argument would run the predefined setup -# a convinient name for the default profile is tb<id> where id is -# the id assigned to your box -TB_DEFAULT_PROFILE=tb99 +# TB_ACTIVE_PROFILES list the default lsit of profile to use for tb +# in the absence of -p <profile> on the commadn line these profiles +# will be implicitely selected +TB_ACTIVE_PROFILES="master_gerrit lo-4-1_gerrit lo-4-1_tb daily_bibisec_upload_master_tb" # if you are doing tb build, we need a SMTP server # to send email to the tinderbox server, to post @@ -42,6 +32,7 @@ TB_DEFAULT_PROFILE=tb99 # and we need a user/passwd. # if your smtp does not need credentials # then you can omit both user and passwrd +# note email are also used to notify committer of build failure TB_SMTP_HOST=smtp.gamil.com TB_SMTP_USER=john.doe TB_SMTP_PASSWORD=password diff --git a/tb/config-sample/profiles/tb99/branches/master/autogen.lastrun_gerrit b/tb/config-sample/profiles/master_gerrit/autogen.lastrun similarity index 100% rename from tb/config-sample/profiles/tb99/branches/master/autogen.lastrun_gerrit rename to tb/config-sample/profiles/master_gerrit/autogen.lastrun diff --git a/tb/config-sample/profiles/master_gerrit/config b/tb/config-sample/profiles/master_gerrit/config new file mode 100644 index 0000000..42dd99c --- /dev/null +++ b/tb/config-sample/profiles/master_gerrit/config @@ -0,0 +1,24 @@ + +#mandatory param: indicate a gerrit build +TB_TYPE=gerrit + +# name used for repporting +TB_NAME=Linux-x86_84@99-optional-comment + +# branch targeted by this profile +TB_BRANCH=master + +# location of the git repo for this profile +TB_GIT_DIR=/lo/gerrit_master + +# gerrit host alias +# It is recommended to have an entry gerrit_tb<id> in ~/.ssh/config +# in the form +# +# Host tb_gerrit99 +# User tb99 +# Port 29418 +# Hostname gerrit.libreoffice.org +# IdentityFile <path to the public key for tb99 as registered in gerrit> +# +TB_GERRIT_HOST=gerrit_tb99 diff --git a/tb/config-sample/profiles/tb99/branches/master/autogen.lastrun_tb b/tb/config-sample/profiles/tb99/branches/master/autogen.lastrun_tb deleted file mode 100644 index 51c8615..0000000 --- a/tb/config-sample/profiles/tb99/branches/master/autogen.lastrun_tb +++ /dev/null @@ -1 +0,0 @@ ---disable-ccache diff --git a/tb/config-sample/profiles/tb99/branches/master/config_gerrit b/tb/config-sample/profiles/tb99/branches/master/config_gerrit deleted file mode 100644 index ccda286..0000000 --- a/tb/config-sample/profiles/tb99/branches/master/config_gerrit +++ /dev/null @@ -1,3 +0,0 @@ - -# -TB_GIT_DIR=~/lo/core_gerrit diff --git a/tb/config-sample/profiles/tb99/branches/master/config_tb b/tb/config-sample/profiles/tb99/branches/master/config_tb deleted file mode 100644 index 306d2b8..0000000 --- a/tb/config-sample/profiles/tb99/branches/master/config_tb +++ /dev/null @@ -1,4 +0,0 @@ - -TB_TINDERBOX_BRANCH=MASTER -TB_GIT_DIR=~/lo/master_tb -TB_INCREMENTAL=1 diff --git a/tb/config-sample/profiles/tb99/config b/tb/config-sample/profiles/tb99/config deleted file mode 100644 index 57ecc8c..0000000 --- a/tb/config-sample/profiles/tb99/config +++ /dev/null @@ -1,11 +0,0 @@ -# Profile Level configuration -# -# Gerrit host -# for gerrit related operation. -# It is easier to just define an alias -# in ~/.ssh -# Here we define d gerrit_tb99 as an alias -# for [email protected] on the right port -# with the right identity. -TB_GERRIT_HOST=gerrit_tb99 - _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
