4 |
# + build latest files |
# + build latest files |
5 |
# + move new files to CCF repository |
# + move new files to CCF repository |
6 |
# |
# |
7 |
# $Id: autobuild,v 1.5 2014/12/02 15:57:10 ccflib Exp $ |
# $Id: autobuild,v 1.6 2014/12/03 14:46:22 ccflib Exp $ |
8 |
# |
# |
9 |
|
|
10 |
. $HOME/bin/ccflib.cfg |
. $HOME/bin/ccflib.cfg |
11 |
|
|
12 |
##echo $me running on `date` |
##echo $me running on `date` |
23 |
|
|
24 |
count=0 |
count=0 |
25 |
maxcount=10 |
maxcount=10 |
26 |
|
trap unlock EXIT |
27 |
|
|
28 |
while [ -e $LOCK -a $count -lt $maxcount ] ; do |
while [ -e $LOCK -a $count -lt $maxcount ] ; do |
29 |
count=$[count + 1] |
count=$[count + 1] |
30 |
echo $me: $LOCK exists. Sleeping 300s [$count] |
echo $me: $LOCK exists. Sleeping 60s [$count] |
31 |
sleep 300 |
sleep 60 |
32 |
done |
done |
33 |
if [ $count -lt $maxcount ] ; then |
if [ $count -lt $maxcount ] ; then |
34 |
touch $LOCK |
touch $LOCK |
35 |
trap unlock EXIT |
# trap unlock EXIT |
36 |
getdeliveries |
getdeliveries |
37 |
buildlatest && acceptbuild |
buildlatest && acceptbuild |
38 |
else |
else |
46 |
# The email initially went to ccflib@xmm.esac.esa.int where the procmailrc file |
# The email initially went to ccflib@xmm.esac.esa.int where the procmailrc file |
47 |
# copied it to xmm-it mailman mail list and stored it into a mailbox under ccflib |
# copied it to xmm-it mailman mail list and stored it into a mailbox under ccflib |
48 |
# directory ($HOME/Mail/....). However, this mail is only telling that autobuild was |
# directory ($HOME/Mail/....). However, this mail is only telling that autobuild was |
49 |
# executed, in fact not evn that but buildlatest. So, a change has been made in the |
# executed, in fact not even that but buildlatest. So, a change has been made in the |
50 |
# ccflib procmailrc file to filter out these messages and sent only to the |
# ccflib procmailrc file to filter out these messages and sent only to the |
51 |
# CCF Building system administrator (eduardo.ojero@esa.int). |
# CCF Building system administrator (eduardo.ojero@esa.int). |
52 |
|
|
53 |
if [ -s $LOG ] ; then |
if [ -s $LOG ] ; then |
54 |
/usr/lib/sendmail -t <<EOF |
/usr/lib/sendmail -t <<EOF |
55 |
To: ccflib@xmm.esac.esa.int |
To: ccflib@xmm.esac.esa.int |
56 |
Subject: CCF build `date` |
Subject: Run of autobuild@sasbld01 - CCF build at `date` |
57 |
|
|
58 |
|
Only for the ccflib administrator eyes. |
59 |
|
|
60 |
|
The following log was produced during the last build of autobuild: |
61 |
|
|
62 |
`cat $LOG` |
`cat $LOG` |
63 |
|
|