summaryrefslogtreecommitdiff
path: root/ciabot/README
blob: 6124f53666453820c614bf14824864bd24f7968d (plain)
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
How the IRC nofication part works:

1) After a reboot, start-irker.sh and start-ciabot.sh has to be started
manually. The first starts irkerd, which -- in case of no errors -- has no
output. The second starts run-libreoffice-ciabot.pl in screen.

2) run-libreoffice-ciabot.pl invokes libreoffice-ciabot.pl for each commit, which
has an XML output, piped into irker-cia-proxy.py, which sends the info to
irkerd.


TESTING
-------

How to test the IRC notification part:
--------------------------------------

1) Take the IRC bot "offline", by editing ~/bin/irker-cia-proxy/projmap.json,
e.g. redirect the channel from #libreoffice-dev to some test channel.

2) Run:

cd ~/libreoffice/core
perl ~/bin/libreoffice-ciabot.pl core f9453275d2710f9d3e9a4cc1285a57db334a5e2e | (cd ~/bin/irker-cia-proxy; python irker-cia-proxy.py -s)

3) Once you're happy with the result, change projmap.json back.


How to test the Bugzilla integration:
-------------------------------------

- Follow the instructions in INSTALL to install packages and configure
  the software.

  (NOTE: It's possible that for simple testing you won't have to
  install repos besides dev-tools and LibreOffice core. More details
  in the future :-)

- Edit file projmap.json to change the IRC channel

e.g. "to": "irc://irc.freenode.net/libreoffice-dev" ->
     "to": "irc://irc.freenode.net/libreoffice-dev-test"

- Edit config.cfg to change the url for the Bugzilla install

e.g. url = bugs.libreoffice.org/xmlrpc.cgi ->
     url = bugzilla-test.documentfoundation.org/xmlrpc.cgi

Don't forget to also update the user/password for connecting.

- If you don't have a LibreOffice core repo handy, clone one out

https://wiki.documentfoundation.org/Development/BuildingOnLinux#Cloning_and_building

- cd to the LibreOffice core repo

 cd ~/libreoffice/core

- Run the script:

That should give you text that looks like this (abbreviated for space):

 <message>
    <generator>
        <name>CIA Perl client for Git</name>
        <version>1.0</version>
    </generator>
   ...
 </message>

If that doesn't crash, let's go further.

- Make a commit in the core repo (but do NOT push it!).

Reference a test bug so you don't email anyone else. Example:

commit 3da8ea79e9616332fdd13a78409e963a96318428
Author: Robinson Tryon <qubit@runcibility.com>
Date:   Sun Dec 7 19:49:36 2014 -0500

    fdo#76789 - Test Git-Bugzilla integration scripts
    
    Testing the integration scripts in ciabot/ to make sure that they run
    as expected against a new server setup.

If the run is successful, you shouldn't see any output.

- Check the bug report to confirm that the change took place.

Example:

  Whiteboard: target:4.4.0

  Comment:

  Testy Tester 2014-12-08 01:05:09 UTC
  
  Robinson Tryon committed a patch related to this issue.
  It has been pushed to "master":
  
  https://git.libreoffice.org/core/commit/3da8ea79e96163
  
  fdo#76789 - Test Git-Bugzilla integration scripts
  
  The patch should be included in the daily builds available at
  https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
  information about daily builds can be found at:
  https://wiki.documentfoundation.org/Testing_Daily_Builds
  Affected users are encouraged to test the fix and report feedback.