mirror of
https://github.com/gryf/ferrit.git
synced 2026-02-07 08:45:53 +01:00
README update
This commit is contained in:
45
README.rst
45
README.rst
@@ -25,17 +25,23 @@ by invoking:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ python3 gerrit_fake_http_server.py
|
||||
$ ferrit
|
||||
|
||||
and
|
||||
To trigger the build initiated by gerrit fake server, use the curl utility to
|
||||
send appropriate data to jenkins server:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ python3 gerrit_fake_ssh_server.py
|
||||
$ curl -d 'project=example&branch=master&type=patchset-created' \
|
||||
http://localhost:8181/make/event
|
||||
|
||||
With this command, we tell ferrit http server, to prepare right payload with
|
||||
project set to *example*, branch set to *master* and type of the event to
|
||||
*patchset-created*. This will build a json-like structure and send it through
|
||||
the fifo queue to the SSH server, which will be catch by jenkins, who is
|
||||
listing to the events. If the project and branch match, appropriate job will be
|
||||
executed.
|
||||
|
||||
Output of the last command will provide fifo file name used for triggering
|
||||
events in json format which can be generated using third part of the Ferrit -
|
||||
script `generate_event.py`.
|
||||
|
||||
Installation
|
||||
------------
|
||||
@@ -45,7 +51,24 @@ Prerequisites
|
||||
|
||||
.. TODO (jenkins, plugins installation and configuration)
|
||||
|
||||
SSH keys
|
||||
========
|
||||
|
||||
For both - jenkins and ferrit server, you'll need ssh key. To generate it for
|
||||
paramiko is a bit tricky, depending which version of openssh you have
|
||||
installed.
|
||||
|
||||
For versions prior to 7.8, it is enough to issue a command:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ ssh-keygen -f gerrit-server-key
|
||||
|
||||
but for 7.8 and up:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ ssh-keygen -f gerrit-server-key -m pem
|
||||
|
||||
Python
|
||||
======
|
||||
@@ -55,8 +78,18 @@ Ferrit modules are written in Python and depends on two external libraries:
|
||||
- `paramiko`_ for ssh server
|
||||
- `bottle`_ for http server
|
||||
|
||||
Installation is as easy as issuing command:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ pip install .
|
||||
|
||||
in root of this repository. You can use virtualenv for your convenience. All
|
||||
dependencies will be installed automatically.
|
||||
|
||||
Please note, Python 2.x is not supported.
|
||||
|
||||
----
|
||||
|
||||
`Ferrite image`_ by Karl-Martin Skontorp is on Attribution 2.0 Generic (CC BY
|
||||
2.0) license.
|
||||
|
||||
Reference in New Issue
Block a user