61f146d69e300d9e6aa395b2ecd0ee8e608cdd2b
[apps/native/sample/sample-core-components.git] / tool / development / buildbot / README
1 These are build and check scripts related with sample apps development.
2
3 A) There is script which checks every gerrit change for:
4 1. Compilation error using tizen binary from SDK
5 2. Compatibility with sample templates using TCC
6 3. Code quality using checkpatch_tizen.pl
7 4. Code typos using aspell
8
9 B) There is also daily routine check for listed projects
10
11 C) There is sctript which sends notification if update is available for sample-core-components.
12
13 Prerequisites:
14
15 1. Install pip
16     sudo apt-get install python-pip
17 2. Install pygerrit using pip
18     sudo pip install pygerrit
19 3. Install aspell
20     sudo apt-get install aspell
21 4. Configure ssh connection to gerrit using ssh key without password.
22 5. For convenience and easier description of set up process we assume that sample-core-components is installed in ~/
23
24
25 A) Set up process for gerrit change check:
26
27 1. Create build directory. In this directory project repositories will be downloaded and checked:
28     mkdir ~/tizen_native_samples_build
29 2. Copy sample configuration template to actual samples configuration file:
30     cp ~/sample-core-components/tool/development/buildbot/native-samples.cfg.template ~/tizen_native_samples_build/.native-samples.cfg
31 3. Fill fields in ~/tizen_native_samples_build/.native-samples.cfg with correct data.
32     Configuration file has comments which describe configuration options
33 4. Test if everything is correct:
34    ~/sample-core-components/tool/development/buildbot/test_configuration.py ~/tizen_native_samples_build/ YOUR_EMAIL@SERVER.COM
35 5. Install crontab entry for polling and building changes every minute. Copy line with poll_and_build_changes.py from ~/sample-core-components/tool/development/buildbot/crontab.template
36 to users crontab:
37     crontab -e
38
39 That's all.
40 From now on scripts polls for gerrit changes in projects listed in configuration files.
41 Saves those changes to ~/tizen_native_samples_build/.native-samples.db sqlite database.
42 Then for every change from database performs build and sanity checks
43 and adds comments to gerrit.
44
45 B) Set up process for daily routine check:
46
47 1. Create daily build directory. In this directory project repositories will be downloaded and checked:
48     mkdir ~/tizen_native_samples_daily_build
49 2. Copy sample configuration template to actual samples configuration file:
50     cp ~/sample-core-components/tool/development/buildbot/native-samples.cfg.template ~/tizen_native_samples_daily_build/.native-samples.cfg
51 3. Fill fields in ~/tizen_native_samples_build/.native-samples.cfg with correct data.
52     Configuration file has comments which describe configuration options
53 4. Test if everything is correct:
54    ~/sample-core-components/tool/development/buildbot/test_configuration.py ~/tizen_native_samples_daily_build/ YOUR_EMAIL@SERVER.COM
55 5. Install crontab entry for polling and building changes every minute. Copy line with daily_regression_check.py from ~/sample-core-components/tool/development/buildbot/crontab.template
56 to users crontab:
57     crontab -e
58
59 That's all - now every day check sumarry emails will be sent to configured email addresses.
60
61 C) Set up update notification check:
62 1. Use already configured directory in A or B ( ~/tizen_native_samples_daily_build or  ~/tizen_native_samples_build) and copy line with check_for_updates.py
63 from ~/sample-core-components/tool/development/buildbot/crontab.template to users crontab:
64 crontab -e
65
66 That's all now update notifications will be sent to emails configured in certain configuration directory