summaryrefslogtreecommitdiff
path: root/mason/README
blob: c7e4a67c1d0cc468d435baa059df49accc188258 (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
Administrator's guide to Mason
==============================

This README is intended for people who are deploying a Baserock Mason for their
site. It's a bit rough and ready right now, I apologise.

Configuring your Zuul Layout
-------------------------

The job of Mason is to trigger jobs based on certain events from Gerrit. These
jobs will build and/or test commits from Gerrit.

The key part of Mason is [Zuul], a tool that came from the OpenStack project.
If you have time, read through the Zuul manual. Here's a brief summary: Zuul
lets you define 'pipelines'. Each 'pipeline' will trigger on some kind of
event, will either succeed or fail, and will report this somehow. For each
Gerrit project, you then define which pipelines you want to attach to that
project, and what jobs should be run in that pipeline for that project.

Read the last part of that sentence carefully: the same Zuul pipeline can run a
different set of jobs depending on which project it has triggered on. A pipeline
defines a generic concept like "pre-merge testing of new Gerrit changes" or
"build 'master' after each commit".

Here's a 'post-commit' pipeline, which will trigger each time someone commits
something to a 'master' branch in Gerrit. (Some projects prevent people from
committing directly to 'master', to ensure all patches go through a code review
process, and this pipeline might be useless in that case).

  - name: post-commit
    manager: IndependentPipelineManager
    trigger:
      gerrit:
        event: ref-updated
        ref: master





[Zuul]: http://docs.openstack.org/infra/zuul/