jenkins development: enhanced ./jenkins_build status output
This commit is contained in:
parent
6668c1ed22
commit
5131bfb2f1
@ -13,11 +13,12 @@
|
||||
# environment variables (all optional)
|
||||
# JENKINS : URL of jenkins server. Default http://exiv2.dyndns.org:8080
|
||||
##
|
||||
start=$(date)
|
||||
if [ -z "$JENKINS"]; then export JENKINS=http://exiv2.dyndns.org:8080; fi
|
||||
result=0
|
||||
base=$(basename $0)
|
||||
tmp=/tmp/$base.tmp
|
||||
if [ -z "$JENKINS"]; then JENKINS=http://exiv2.dyndns.org:8080; fi
|
||||
start=$(date)
|
||||
starts=$(date +%s)
|
||||
|
||||
##
|
||||
# functions
|
||||
@ -48,7 +49,8 @@ if [ "$1" == "status" ]; then
|
||||
declare -A expects=( [linux]=900 [macosx]=900 [cygwin]=1000 [mingw]=100 [msvc]=1200 )
|
||||
for b in linux macosx cygwin mingw msvc ; do
|
||||
echo $build/$b
|
||||
curl --silent $JENKINS/job/Exiv2-$build/label=$b/lastBuild/consoleText | tee $tmp | grep -E -e SVN_[A-Z]+= -e JOB_NAME -e BUILD_ID -e Finished $@ ;
|
||||
curl --silent $JENKINS/job/Exiv2-$build/label=$b/lastBuild/consoleText | tee $tmp |\
|
||||
grep -E -e SVN_[A-Z]+= -e JOB_NAME -e BUILD_ID -e Finished -e seconds $@ ;
|
||||
declare -i lines=$(wc -l $tmp | cut -d/ -f 1)
|
||||
declare -i expect=${expects[$b]}
|
||||
diff=$(( lines-expect>0?lines-expect:expect-lines ))
|
||||
@ -94,7 +96,7 @@ fi
|
||||
echo "1 target = $target platform = $PLATFORM WORKSPACE = $WORKSPACE"
|
||||
if [ $PLATFORM == "macosx" -a -z "$macosx" ]; then export macosx=true ; export target=macosx ; fi
|
||||
if [ $PLATFORM == "linux" -a -z "$linux" ]; then export linux=true ; export target=linux ; fi
|
||||
if [ -z "$cygwin" -a ! -z $CYGWIN ]; then export cygwin=$CYGWIN ; fi
|
||||
if [ -z "$cygwin" -a ! -z $CYGWIN ]; then export cygwin=$CYGWIN ; fi
|
||||
if [ -z "$tests" ]; then export tests=true ; fi
|
||||
if [ -z "$WORKSPACE" ]; then export WORKSPACE="$0/$PLATFORM" ; fi
|
||||
|
||||
@ -201,8 +203,7 @@ case "$build" in
|
||||
;;
|
||||
esac
|
||||
|
||||
echo start $start
|
||||
echo finish $(date)
|
||||
echo target "$target" start: "$start" finish: $(date) diff: $(( $(date +%s) - starts )) seconds
|
||||
set -v
|
||||
# That's all Folks!
|
||||
##
|
||||
|
||||
Loading…
Reference in New Issue
Block a user