/
example.conf
154 lines (137 loc) · 3.46 KB
/
example.conf
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Email notification
notify.from your.ci.script@recidiv.example.org
notify.to {
developer1@example.org
developer2@example.org
}
# If this is set to 1 an email is sent for every failed test.
# Otherwise if it is set to 0 an email is sent the first time a given test
# fails, and another email when the test is back working.
notify.every.failure 0
smtp.server 127.0.0.1
# History length. How many old runs to remember per every test instance?
history.len 1024
# The data file is where all the data about old tests is saved.
datafile /tmp/recidiv.dat
# Webroot is where we generate the HTML files for the web site.
# The site is completely static and is generated again from scratch every
# time you restart the CI script.
#
# The web site is also generated every time a new test is completed.
webroot /tmp/
# Show latest N runs for every test in the site home.
web.index.show.latest 15
# Show latest N runs in err state.
web.index.show.latest.err 5
# The whitelist is a list of errors that are actually false negative like
# network errors and alike, as glob-style patterns.
whitelist {
"*unable to connect a socket*"
}
# Setup what to test.
#
# Note that every test should start with a "cd" statement, it is not
# mandatory but usually you want to be sure to enter the directory
# where the thing to test is.
test always-ok-one {
"cd ."
"echo hello"
}
# This second test has options to make it run at max one time every 30 seconds.
test always-ok-two {
"cd ."
"echo FooBar"
} {
run.minimal.period 30
}
# the 'testprg' program is designed to fail from time to time.
test sometime-fails {
"cd ."
"./testprg"
}
# It is possible to ignore errors of specific commands prefixig the command
# with the "!" character as in the following example.
test always-ok-ignoring-error {
"cd ."
"!./testprg"
}
# This is another more realistic test:
#
# test redis-2.2 {
# "cd /tmp/redis"
# "git checkout 2.2"
# "git pull origin 2.2"
# "make clean"
# "make"
# "tclsh8.5 tests/test_helper.tcl --verbose"
# }
# Test execution settings
# Number of seconds to wait after the execution of every test before
# executing the next one.
wait.after.every.test 3
# It is possible to run a command after every test execution.
# %testname and %testres are expanded to the name of the test
# as specified in the tests directives, and to "ok" or "err" depending
# on the test outcome.
#
# The RECIDIV_ERROR environment variable is set to the full error.
run.after {
echo "Just executed %testname, result: %testres" > /tmp/last_recidiv_run.txt
}
# Html template
template {
<!doctype html>
<html><head><title>Recidiv CI</title>
<style>
body {
font-family: Helvetica;
}
a {
color: #0063dc;
text-decoration: none;
}
h2 {
color: #666;
}
h3 {
color: #666;
}
#badges {
margin:25px;
}
.badge {
font-size:22px;
background-color:#dddddd;
border:1px #aaaaaa solid;
border-radius:10px;
display:inline;
padding:15px;
margin-right:10px;
}
.status_ok {
color: darkgreen;
font-weight: bold;
}
.status_err {
color: red;
font-weight: bold;
}
.errorcmd {
color:white;
background-color: #f55000;
padding:10px;
font-size:16px;
font-family:monospace;
}
#footer {
color: #999;
font-size: 12px;
}
</style>
<body>
<h1>Recidiv<span style="color:red">CI</span></h1>
%content%
<div id="footer">This Continuous Integration is powered by <a href="http://github.com/antirez/recidiv">Recidiv</a>.</div>
</body>
</html>
}