blob: dfe042dca225ae0df3e190b832eb65b23c39560f [file] [log] [blame]
Ales Komarek3446a0a2016-03-08 10:21:00 +01001
Ales Komarek7f93ce22016-08-29 23:27:47 +02002======
3Gerrit
4======
Ales Komarek3446a0a2016-03-08 10:21:00 +01005
Ales Komarek7f93ce22016-08-29 23:27:47 +02006Gerrit provides web based code review and repository management for the Git version control system.
Ales Komarek3446a0a2016-03-08 10:21:00 +01007
8Sample pillars
9==============
10
Ales Komarek49a37292016-08-31 16:18:31 +020011Simple gerrit service
Ales Komarek3446a0a2016-03-08 10:21:00 +010012
13.. code-block:: yaml
14
15 gerrit:
16 server:
17 enabled: true
Ales Komarek7f93ce22016-08-29 23:27:47 +020018 source:
19 engine: http
20 address: https://gerrit-ci.gerritforge.com/job/Gerrit-stable-2.13/20/artifact/buck-out/gen/gerrit.war
21 hash: 2e17064b8742c4622815593ec496c571
Ales Komarek3446a0a2016-03-08 10:21:00 +010022
Ales Komarek49a37292016-08-31 16:18:31 +020023Full service setup
24
25.. code-block:: yaml
26
27 gerrit:
28 server:
29 canonical_web_url: http://10.10.10.148:8082/
30 email_private_key: ""
31 token_private_key: ""
32 initial_user:
33 full_name: John Doe
34 email: 'mail@jdoe.com'
35 username: jdoe
36 plugin:
37 download-commands:
38 engine: gerrit
39 # replication:
40 # engine: gerrit
41 reviewnotes:
42 engine: gerrit
43 singleusergroup:
44 engine: gerrit
45 ssh_rsa_key: |
46 -----BEGIN RSA PRIVATE KEY-----
47 MIIEowIBAAKCAQEAs0Y8mxS3dfs5zG8Du5vdBkfOCOng1IEUmFZIirJ8oBgJOd54
48 QgmkDFB7oP9eTCgz9k/rix1uJWhhVCMBzrWzH5IODO+tyy/tK66pv2BWtVfTDhBA
49 nShOLDNbSIBaV8E/NcrbnQN+b0alp4N7rQnavkOYl+JQncKjz1csmCodirscB9Oj
50 rdo6NG9olv9IQd/tDQxEeDyQkoW50aCEWcq7o+QaTzgnlrL+XZEzhzjdcvA9m8go
51 ...
52 jvMXms60iD/A5OpG33LWHNNzQBP486SxG75LB+Xs5sp5j2/b7VF5LJLhpGiJv9Mk
53 ydbuy8iuuvali2uF133kAlLqnrWfVTYQQI1OfW5glOv1L6kv94dU
54 -----END RSA PRIVATE KEY-----
55 ssh_rsa_key_pub: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzRjybFLd1+znMbwO7m90GR84I6eDUgRSYVkiKsnygGAk53nhCCaQMUHug/15MKDP2T+uLHW4laGFUIwHOtbMfkg4M763LL+0rrqm/YFa1V9MOEECdKE4sM1tIgFpXwT81ytudA35vRqWng3utCdq+Q5iX4lCdwqPPVyyYKh2KuxwH06Ot2jo0b2iW/0hB3+0NDER4PJCShbnRoIRZyruj5BpPOCeWsv5dkTOHON1y8D2byCgNGdCBIRx7x9Qb4dKK2F01r0/bfBGxELJzBdQ8XO14bQ7VOd3gTxrccTM4tVS7/uc/vtjiq7MKjnHGf/svbw9bTHAXbXcWXtOlRe51
56 email: mail@domain.com
57 auth:
58 engine: HTTP
59 source:
60 engine: http
61 address: https://gerrit-releases.storage.googleapis.com/gerrit-2.12.4.war
62 hash: sha256=45786a920a929c6258de6461bcf03ddec8925577bd485905f102ceb6e5e1e47c
63 database:
64 engine: postgresql
65 host: localhost
66 port: 5432
67 name: gerrit
68 user: gerrit
69 password: ${_param:postgresql_gerrit_password}
70
Ales Komarek2fc39002016-09-14 11:43:56 +020071
72Gerrit client enforcing groups
73
74.. code-block:: yaml
75
76 gerrit:
77 client:
78 group:
79 Admin001:
80 description: admin 01
81 Admin002:
82 description: admin 02
83
84
85Gerrit client enforcing users
86
87.. code-block:: yaml
88
89 gerrit:
90 client:
91 user:
92 jdoe:
93 fullname: John Doe
94 email: "jdoe@domain.com"
95 ssh_key: ssh-rsa
96 http_password: password
97 groups:
98 - Admin001
99
100
Ales Komarek49a37292016-08-31 16:18:31 +0200101Gerrit client enforcing projects
102
103.. code-block:: yaml
104
105 gerrit:
106 client:
107 enabled: True
108 server:
109 host: 10.10.10.148
110 user: newt
111 key: |
112 -----BEGIN RSA PRIVATE KEY-----
113 MIIEowIBAAKCAQEAs0Y8mxS3dfs5zG8Du5vdBkfOCOng1IEUmFZIirJ8oBgJOd54
114 QgmkDFB7oP9eTCgz9k/rix1uJWhhVCMBzrWzH5IODO+tyy/tK66pv2BWtVfTDhBA
115 ...
116 l1UrxQKBgEklBTuEiDRibKGXQBwlAYvK2He09hWpqtpt9/DVel6s4A1bbTWDHyoP
117 jvMXms60iD/A5OpG33LWHNNzQBP486SxG75LB+Xs5sp5j2/b7VF5LJLhpGiJv9Mk
118 ydbuy8iuuvali2uF133kAlLqnrWfVTYQQI1OfW5glOv1L6kv94dU
119 -----END RSA PRIVATE KEY-----
Ales Komarek50c558e2016-09-05 23:34:43 +0200120 email: "Project Creator <infra@lists.domain.com>"
Ales Komarek49a37292016-08-31 16:18:31 +0200121 project:
122 test_salt_project:
123 enabled: true
124
Ales Komarek50c558e2016-09-05 23:34:43 +0200125Gerrit client enforcing project, full project example
126
127.. code-block:: yaml
128
129 gerrit:
130 client:
131 enabled: True
132 project:
133 test_salt_project:
134 enabled: true
135 access:
136 "refs/heads/*":
137 actions:
138 - name: abandon
139 group: openstack-salt-core
140 - name: create
141 group: openstack-salt-release
142 labels:
143 - name: Code-Review
144 group: openstack-salt-core
145 score: -2..+2
146 - name: Workflow
147 group: openstack-salt-core
148 score: -1..+1
149 "refs/tags/*":
150 actions:
151 - name: pushSignedTag
152 group: openstack-salt-release
153 require_change_id: true
154 require_agreement: true
155 merge_content: true
156
157Sample project access
158
159.. code-block:: yaml
160
161 [access "refs/*"]
162 read = group Administrators
163 read = group Anonymous Users
164 [access "refs/for/refs/*"]
165 push = group Registered Users
166 pushMerge = group Registered Users
167 [access "refs/heads/*"]
168 create = group Administrators
169 create = group Project Owners
170 forgeAuthor = group Registered Users
171 forgeCommitter = group Administrators
172 forgeCommitter = group Project Owners
173 push = group Administrators
174 push = group Project Owners
175 label-Code-Review = -2..+2 group Administrators
176 label-Code-Review = -2..+2 group Project Owners
177 label-Code-Review = -1..+1 group Registered Users
178 label-Verified = -1..+1 group Non-Interactive Users
179 submit = group Administrators
180 submit = group Project Owners
181 editTopicName = +force group Administrators
182 editTopicName = +force group Project Owners
183 [access "refs/meta/config"]
184 exclusiveGroupPermissions = read
185 read = group Administrators
186 read = group Project Owners
187 push = group Administrators
188 push = group Project Owners
189 label-Code-Review = -2..+2 group Administrators
190 label-Code-Review = -2..+2 group Project Owners
191 submit = group Administrators
192 submit = group Project Owners
193 [access "refs/tags/*"]
194 pushTag = group Administrators
195 pushTag = group Project Owners
196 pushSignedTag = group Administrators
197 pushSignedTag = group Project Owners
198 [label "Code-Review"]
199 function = MaxWithBlock
200 copyMinScore = true
201 value = -2 This shall not be merged
202 value = -1 I would prefer this is not merged as is
203 value = 0 No score
204 value = +1 Looks good to me, but someone else must approve
205 value = +2 Looks good to me, approved
206 [label "Verified"]
207 function = MaxWithBlock
208 copyMinScore = true
209 value = -1 Fails
210 value = 0 No score
211 value = +1 Verified
212
Ales Komarek3446a0a2016-03-08 10:21:00 +0100213Read more
214=========
215
Ales Komarek7f93ce22016-08-29 23:27:47 +0200216* https://www.gerritcodereview.com/
Ales Komarekf93ac812016-08-31 19:37:43 +0200217* https://gerrit-review.googlesource.com/Documentation/
Ales Komarek7f93ce22016-08-29 23:27:47 +0200218* https://github.com/openstack-infra/puppet-gerrit/
219* https://gerrit-ci.gerritforge.com/
Ales Komarek10526762016-09-19 15:21:46 +0200220* https://github.com/morucci/exzuul