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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
\input texinfo
@setfilename cuirass.info
@documentencoding UTF-8
@include version.texi
@settitle Cuirass Reference Manual
@setchapternewpage odd
@copying
This manual is for Cuirass version @value{VERSION}, a build automation
server.
Copyright @copyright{} 2016 Mathieu Lirzin
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled ``GNU Free
Documentation License''.
@end quotation
@end copying
@dircategory Software development
@direntry
* Cuirass: (cuirass). Build automation server.
@end direntry
@titlepage
@title Cuirass Reference Manual
@subtitle Build automation server
@subtitle for version @value{VERSION}, @value{UPDATED}
@author by Mathieu Lirzin
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
@contents
@ifnottex
@node Top
@top Cuirass
@insertcopying
@end ifnottex
@c *********************************************************************
@menu
* Introduction:: What is Cuirass about?
Tutorial sections:
* Overview:: A quick tour of Cuirass
Reference sections:
* Invocation:: How to run Cuirass.
* Contributing:: Your help needed!
* GNU Free Documentation License:: The license of this manual.
* Concept Index:: Concepts.
@end menu
@c *********************************************************************
@node Introduction
@unnumbered Introduction
@cindex introduction
@dfn{Cuirass} is a general-purpose build automation server that checks
out source files from @acronym{VCS, Version Control System}
repositories, executes a @dfn{build job}, and notifies the results of
that job. A build job consists of a combinaison of tasks such as
compiling source code to binary code and running automated tests.
Notification is achieved by using a database that stores the build
results associated with an HTTP server that provides a convenient way to
access them.
Cuirass is inspired by the @url{https://nixos.org/hydra/, Hydra}
continuous build system. Unlike Hydra, it is built on top of the
@url{https://www.gnu.org/software/guix/, GNU Guix} functional package
manager.
The goal of Cuirass is to provide both on-demand, scheduled, and
triggered builds. A Build server is an important tool in the software
development process, because it allows modifying the source code while
ensuring the portability and robustness of those changes. It is the
basis of the @dfn{Continuous integration} practice.
@menu
* Continuous Integration:: A Software development practice
@end menu
@c *********************************************************************
@node Continuous Integration
@unnumberedsec Continuous Integration
@c *********************************************************************
@node Overview
@chapter Overview
@command{cuirass} acts as a daemon polling @acronym{VCS, version control
system} repositories for changes, and evaluating a derivation when
something has changed (@pxref{Derivations, Derivations,, guix, Guix}).
As a final step the derivation is realised and the result of that build
allows you to know if the job succeed or not.
What is actually done by @command{cuirass} is specified in a @dfn{job
specification} which is represented as an association list which is a
basic and traditional Scheme data structure. Here is an example of what
a specification might look like:
@lisp
`((#:name . "hello")
(#:url . "git://git.savannah.gnu.org/guix.git")
(#:branch . "master")
(#:no-compile? . #t)
(#:load-path . ".")
(#:proc . cuirass-jobs)
(#:file . "/tmp/drv-file.scm")
(#:arguments (subset . "hello")))
@end lisp
In this specification the keys are Scheme keywords which have the nice
property of being self evaluating. This means that they can't refer to
another value like symbols do.
Currently the only way to add those specifications to cuirass is to put
a list of them in a file and set the @code{--specifications} command
line option argument with the file name when launching the daemon
(@pxref{Invocation}). The specifications are persistent (they are kept
in a SQLite database) so the next time @command{cuirass} is run the
previously added specifications will remain active even if you don't
keep the @code{--specifications} option.
@c *********************************************************************
@node Invocation
@chapter Invoking cuirass
@cindex invoking cuirass
@cindex cuirass invocation
@cindex options for invoking cuirass
The usual way to invoke @code{cuirass} is as follows:
@example
cuirass --specifications @var{specs}
@end example
Additionally the following options can be used.
@table @code
@item --one-shot
Instead of executing @code{cuirass} as a daemon looping over the jobs.
Only evaluate and build the specifications once.
@item --cache-directory=@var{directory}
@var{directory} is the place where the VCS repositories used by the jobs
are stored.
@item --specifications=@var{specifications-file}
@itemx -S @var{specifications-file}
Add the specifications defined in @var{specifications-file} in the job
database before launching the evaluation and build processes.
@item --database=@var{database}
@itemx -D @var{database}
Use @var{database} as the database containing the jobs and the past
build results. Since @code{cuirass} uses SQLite as a database engine,
@var{database} must be a file name. If the file doesn't exist, it will
be created.
@item --port=@var{num}
@itemx -p @var{num}
Make the HTTP interface listen on port @var{num}. Use port 8080 by
default.
@item --interval=@var{n}
@itemx -I @var{n}
Wait @var{n} seconds between each poll.
@item --use-substitutes
This can be useful when you are not interested in building the
dependencies of a particular job.
@item --version
@itemx -V
Display the actual version of @code{cuirass}.
@item --help
@itemx -h
Display an help message that summarize all the options provided.
@end table
@c *********************************************************************
@node Contributing
@chapter Contributing
Everyone is welcome to contribute to Cuirass. You can send patches and
share your ideas at @email{guix-devel@@gnu.org} or contact directly the
maintainer at @email{mthl@@gnu.org}.
@c *********************************************************************
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@cindex license, GNU Free Documentation License
@include fdl-1.3.texi
@c *********************************************************************
@node Concept Index
@unnumbered Concept Index
@printindex cp
@bye
|