/
run.sh
executable file
·125 lines (97 loc) · 2.42 KB
/
run.sh
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/bin/bash
set -x
read_lp(){
launchpad_bugs_mariadb.py \
--tag alert \
--status \
New \
Confirmed \
Triaged \
'In Progress' \
'Fix Committed' \
Incomplete
launchpad_bugs_mariadb.py \
--tag depcheck \
--status \
New \
Confirmed \
Triaged \
'In Progress' \
'Fix Committed' \
Incomplete
launchpad_bugs_mariadb.py \
--tag promotion-blocker \
--status \
New \
Confirmed \
Triaged \
'In Progress' \
'Fix Committed' \
Incomplete
launchpad_bugs_mariadb.py \
--tag tempest \
--status \
New \
Confirmed \
Triaged \
'In Progress' \
'Fix Committed' \
Incomplete
launchpad_bugs_mariadb.py \
--tag upgrade \
--status \
New \
Confirmed \
Triaged \
'In Progress' \
'Fix Committed' \
Incomplete
launchpad_bugs_mariadb.py \
--tag ci \
--status \
New
launchpad_bugs_mariadb.py \
--status \
New
}
read_recent_lp(){
launchpad_bugs_mariadb.py \
--previous_days=5
}
read_bz(){
bugzilla_bugs_mariadb.py
}
read_skipped(){
skiplist
}
read_drop(){
echo "ignore: drop does not execute python, just sql"
}
read_noop(){
releases="master rocky queens pike"
types="upstream rdo tempest"
for release in $releases; do
for type in $types; do
noop_build.py --release "$release" --type "$type"
done
done
}
load_mariadb(){
read_"$1" > /tmp/"$1".csv
mysql -h mariadb -P 3306 -u root < /tmp/load_"$1"_mysql.sql
}
# We could have just keep sleep 60 before load_db, but this helps dev
# itearations, you don't have to wait 1 minute everytime you change stuff
# at mariadb-sidecar
ansible-playbook /tmp/wait-mariadb.yaml
while true; do
# noop jobs have been disabled
# load_mariadb noop 2>&1 | tee /tmp/run.log
load_mariadb drop 2>&1 | tee -a /tmp/run.log
sleep 5;
load_mariadb lp 2>&1 | tee -a /tmp/run.log
load_mariadb bz 2>&1 | tee -a /tmp/run.log
load_mariadb skipped 2>&1 | tee -a /tmp/run.log
load_mariadb recent_lp 2>&1 | tee -a /tmp/run.log
sleep 14400;
done