forked from eea/land.copernicus.plonebuildout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins.cfg
57 lines (50 loc) · 1.34 KB
/
jenkins.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[buildout]
extends =
development.cfg
parts +=
uptest
[configuration]
effective-user = jenkins
www1-http-port = 9991
www2-http-port = 9992
[uptest]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
ZEO=`bin/zeoserver status`
if [ "$ZEO" = "daemon manager not running" ]
then
echo "Starting ZEO..."
bin/zeoserver start
echo "Sleeping for 10 seconds. Zzzz..."
sleep 10
fi
echo "Cleaning up www1.log..."
echo "" > var/log/www1.log
echo "Restarting www1"
bin/www1 restart
echo "Sleeping for 10 seconds. Zzzz..."
sleep 10
STATUS=`wget http://localhost:9991 --spider; echo $?`
if [ "$STATUS" = "0" ]
then
echo "Zope instance www1 started normally:"
echo "===================================="
tail -n 5 var/log/www1.log
echo "===================================="
echo "Stopping www1 instance"
bin/www1 stop
echo "Stopping zeoserver"
bin/zeoserver stop
exit 0
else
echo "Zope instance www1 did't start normally:"
echo "===================================="
tail -n 50 var/log/www1.log
echo "===================================="
bin/www1 stop
bin/zeoserver stop
exit 1
fi
output = ${buildout:directory}/bin/uptest
mode = 755