-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwake-up-zuul.yaml
executable file
·42 lines (36 loc) · 1.21 KB
/
wake-up-zuul.yaml
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
- job-template:
name: 'wake-up-zuul-merger'
node: '{node}'
triggers:
- timed: '0 0 * * *'
builders:
- shell: |
#!/bin/bash -xe
if ps ax | grep -v grep | grep zuul-server > /dev/null ; then
echo "zuul-server service running"
else
echo "zuul-server is not running, start it!"
sudo service zuul start
fi
ping -q -c1 fc > /dev/null
if [ $? -eq 0 ]; then
echo "FC Slave exist"
else
echo "FC Slave does not exist, exit Job!"
exit 1
fi
ping -q -c1 iscsi > /dev/null
if [ $? -eq 0 ]; then
echo "ISCSI Slave exist"
else
echo "ISCSI Slave does not exist, exit Job!"
exit 2
fi
# change ssh to user:ift way, nothing special
ssh ift@172.27.113.3 'sudo service zuul-merger start'
#sudo service zuul-merger start
sleep 600
# change ssh to user:ift way, nothing special
ssh ift@172.27.113.3 'sudo service zuul-merger stop'
#sudo service zuul-merger stop
- link-logs # In macros.yaml from os-ext-testing