Tidy the config template
[buildfarm-client.git] / build-farm.conf.template
1
2 # -*-perl-*- hey - emacs - this is a perl file
3
4 =comment
5
6 Copyright (c) 2003-2010, Andrew Dunstan
7
8 See accompanying License file for license details
9
10 =cut 
11
12 package EximBuild;
13
14 use 5.010;
15 use strict;
16 use warnings;
17
18 my $branch = $::branch;
19
20 # This template assumes that the user running the buildfarm process is "farm"
21 my $farm_user_name = getpwuid($<) // die "$0: can't get user name from uid $<: $!\n";
22
23 our %conf =(
24     scm => 'git',
25     # default is github mirror of Exim
26     # Only used for the initial clone (?)
27     scmrepo => 'https://github.com/Exim/exim.git',
28     # webref for diffs on server - use default for community
29     scm_url => undef,
30     # for --reference on git repo
31     # git_reference => undef,
32     # or gmake if required. can include path if necessary.
33     make => 'make',
34     # 1 = any make will do, 0 = require GNU (default)
35     non_gnu_make => 0,
36     # >1 for parallel "make" and "make check" steps
37     make_jobs => undef,
38     # default is "tar -z -cf runlogs.tgz *.log"
39     # replacement must have the same effect
40     # must be absolute, can be either Unix or Windows style for MSVC
41     tar_log_cmd => undef,
42     # If running multiple animals, an explicit common directory for
43     # the lockfile so that runs do not conflict. Otherwise, leave unset.
44     global_lock_dir => $ENV{HOME},
45     # this directory must exist before anything will work
46     build_root => "$ENV{HOME}/buildfarm",
47     # set true to do vpath builds
48     use_vpath => undef,
49
50     keep_error_builds => 0,
51     # Linux style, use "*.core" for BSD
52     core_file_glob => "core*",
53
54     # build process will connect to this URL to upload results
55     target => 'http://buildfarm.exim.org/cgi-bin/eximstatus.pl',
56     # update_personality uses this when you want to update your
57     # machine's info (OS, version, compiler, version)
58     upgrade_target => 'http://buildfarm.exim.org/cgi-bin/upgrade.pl',
59
60     # Your host alias and password in the BuildFarm
61     animal => "alias_assigned_by_build_team",
62     secret => "secret_assigned_by_build_team",
63
64     # allow automatic updates of the buildfarm client code.
65     # Leave it *unset* to get the default behaviour, set it
66     # to some false value to disable automatic updates or set it
67     # to the name of the remote Git repo you follow for your
68     # buildfarm-client code.
69     #auto_update => 'origin',
70
71     # if force_every is a scalar it will be used on all branches, like this
72     # for legacy reasons:
73     # force_every => 336 , # max hours between builds, undef or 0 = unforced
74     # we now prefer it to be a hash with branch names as the keys, like this
75     #
76     # this setting should be kept conservatively high, or not used at all  -
77     # for the most part it's best to let the script decide if something
78     # has changed that requires a new run for the branch.
79     #
80     # an entry with a name of 'default' matches any branch not named
81     force_every => {
82         HEAD => 24*7,
83         # default => 168,
84     },
85
86     # alerts are triggered if the server doesn't see a build on a branch after
87     # this many hours, and then sent out every so often,
88     alerts => {
89         #HEAD          => { alert_after => 72,  alert_every => 24 },
90     },
91
92     print_success => undef,
93
94     # include / exclude pattern for files whose trigger a build
95     # if both are specified then they are both applied as filters
96     # undef means don't ignore anything.
97     # exclude qr[/(doc|po)/] to ignore changes to docs and po files (recommended)
98     # undef means null filter.
99     trigger_exclude => qr[/(doc|po)/],
100     trigger_include => undef,
101
102     # settings for mail notices - default to notifying nobody
103     # these lists contain addresses to be notified
104     # must be complete email addresses, as the email is sent from the server
105     mail_events =>{
106         all => [], # unconditional
107         fail => [], # if this build fails
108         change => [], # if this build causes a state change
109         green => [], # if this build causes a state change to/from OK
110     },
111
112     # env settings to apply within build/report process
113     # these settings will be seen by all the processes, including the
114     # configure process.
115     build_env =>{
116         # use a dedicated cache for the build farm. this should give us
117         # very high hit rates and slightly faster cache searching.
118         CCACHE_DIR => "$ENV{HOME}/buildfarm/ccache/$branch",
119
120         ### set this if you need a proxy setting for the
121         # outbound web transaction that reports the results
122         # BF_PROXY => 'http://my.proxy.server:portnum/',
123     },
124
125     # Environment settings on the make commandline.
126     # These cause full compile output and don't strip the binary.
127     make_args => q/FULLECHO='' STRIP_COMMAND=''/,
128
129     # Settings to add to Local/Makefile. These will set or override
130     # previous definitions of variables.  Example:
131     # LDFLAGS => '-Wall' will create LDFLAGS = '-Wall'
132     makefile_set =>{
133         # comment out if not using ccache
134         CC => 'ccache gcc',
135         # Required for some tests to pass
136         AUTH_PLAINTEXT => 'yes',
137         SUPPORT_MAILDIR => 'yes',
138         # Other examples. Could use makefile_regex instead.
139         #SUPPORT_TLS => 'yes',
140         #USE_OPENSSL_PC => 'openssl',
141         #TLS_LIBS => '-lssl -lcrypto',
142         #EXPERIMENTAL_SPF => 'yes',
143         #LOOKUP_LDAP => 'yes',
144         #LOOKUP_INCLUDE => '-I/usr/include/mysql -I/usr/include/postgresql'
145         #LOOKUP_LIBS => '-lmysqlclient -lpq -lldap -llber',
146         #LDAP_LIB_TYPE => 'OPENLDAP2',
147     },
148     # Settings to add to Local/Makefile. These will add to variables that
149     # are already defined earlier in the Makefile.  Example:
150     # LDFLAGS => '-Wall'  will create  LDFLAGS+='-Wall'
151     makefile_add =>{
152         # Show all warnings and errors
153         CFLAGS => '-Wall -Werror=format-security',
154         # Or enable debugging flags
155         #CFLAGS => '-g -Wall',
156         #LFLAGS => '-g',
157         # If set EXPERIMENTAL_SPF above, add it to the linker:
158         #LDFLAGS => '-lspf2',
159     },
160
161     # Another way to enable things in the Local/Makefile.
162     # Use a simple regex to change a default to what you want.
163     makefile_regex =>[
164         # If have perl devel libraries installed, can build embedded perl
165         #q(s/^# EXIM_PERL=/EXIM_PERL=/),
166         # If have mysql devel libraries installed
167         #q(s/^# LOOKUP_MYSQL=/LOOKUP_MYSQL=/),
168         # If have postgres devel librarires installed
169         #q(s/^# LOOKUP_PGSQL=/LOOKUP_PGSQL=/),
170         # Severl experimental features to consider
171         #q(s/^# EXPERIMENTAL_CERTNAMES.*/EXPERIMENTAL_CERTNAMES=yes/),
172         #q(s/^# EXPERIMENTAL_DNSSEC.*/EXPERIMENTAL_DNSSEC=yes/),
173         # Proxy causes some extra debug output messing with tests
174         #q(s/^# EXPERIMENTAL_PROXY.*/EXPERIMENTAL_PROXY=yes/),
175         #q(s/^# EXPERIMENTAL_TPDA.*/EXPERIMENTAL_TPDA=yes/),
176     ],
177
178     # The user compiled as the master exim username.
179     # Requirement: The buildfarm user that runs the build farm script *MUST* have
180     # the group of the exim user as a secondary group. Example:
181     # user=>farm, group=>farm, secondary_groups=>exim
182     # user=>exim, group=>exim
183     master_exim_user => "exim",
184
185     # Range of tests to run if enable make_test in optional steps.
186     #range_num_tests => '1 999',
187     range_num_tests => '1 5999',
188     # Hardcode some valid version for use during make test
189     exim_test_version => '4.84',
190
191     optional_steps =>{
192         # which optional steps to run and when to run them
193         # 'make-doc' => {min_hours_since => 24*7},
194         test  => {min_hours_since => 24*7},
195     },
196
197     # locales to test
198     locales => [qw( C )],
199
200     # Placemarker for auto-generated build features
201     config_opts =>[
202         qw()
203     ],
204
205 );
206
207 if ($branch eq 'global')
208 {
209
210     $conf{branches_to_build} = 'ALL';
211
212     # or 'HEAD_PLUS_LATEST' or 'HEAD_PLUS_LATEST2'
213     # or [qw( HEAD RELx_y_STABLE etc )]
214
215 }
216
217 ##################################
218 #
219 # Can use perl below for
220 # per branch processing.
221 #
222 ##################################
223
224 1;