blob: 19e0df94e3194f633918961a3e93bee4c0bb6219 [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
71Gerrit client enforcing projects
72
73.. code-block:: yaml
74
75 gerrit:
76 client:
77 enabled: True
78 server:
79 host: 10.10.10.148
80 user: newt
81 key: |
82 -----BEGIN RSA PRIVATE KEY-----
83 MIIEowIBAAKCAQEAs0Y8mxS3dfs5zG8Du5vdBkfOCOng1IEUmFZIirJ8oBgJOd54
84 QgmkDFB7oP9eTCgz9k/rix1uJWhhVCMBzrWzH5IODO+tyy/tK66pv2BWtVfTDhBA
85 ...
86 l1UrxQKBgEklBTuEiDRibKGXQBwlAYvK2He09hWpqtpt9/DVel6s4A1bbTWDHyoP
87 jvMXms60iD/A5OpG33LWHNNzQBP486SxG75LB+Xs5sp5j2/b7VF5LJLhpGiJv9Mk
88 ydbuy8iuuvali2uF133kAlLqnrWfVTYQQI1OfW5glOv1L6kv94dU
89 -----END RSA PRIVATE KEY-----
Ales Komarek50c558e2016-09-05 23:34:43 +020090 email: "Project Creator <infra@lists.domain.com>"
Ales Komarek49a37292016-08-31 16:18:31 +020091 project:
92 test_salt_project:
93 enabled: true
94
Ales Komarek50c558e2016-09-05 23:34:43 +020095Gerrit client enforcing project, full project example
96
97.. code-block:: yaml
98
99 gerrit:
100 client:
101 enabled: True
102 project:
103 test_salt_project:
104 enabled: true
105 access:
106 "refs/heads/*":
107 actions:
108 - name: abandon
109 group: openstack-salt-core
110 - name: create
111 group: openstack-salt-release
112 labels:
113 - name: Code-Review
114 group: openstack-salt-core
115 score: -2..+2
116 - name: Workflow
117 group: openstack-salt-core
118 score: -1..+1
119 "refs/tags/*":
120 actions:
121 - name: pushSignedTag
122 group: openstack-salt-release
123 require_change_id: true
124 require_agreement: true
125 merge_content: true
126
127Sample project access
128
129.. code-block:: yaml
130
131 [access "refs/*"]
132 read = group Administrators
133 read = group Anonymous Users
134 [access "refs/for/refs/*"]
135 push = group Registered Users
136 pushMerge = group Registered Users
137 [access "refs/heads/*"]
138 create = group Administrators
139 create = group Project Owners
140 forgeAuthor = group Registered Users
141 forgeCommitter = group Administrators
142 forgeCommitter = group Project Owners
143 push = group Administrators
144 push = group Project Owners
145 label-Code-Review = -2..+2 group Administrators
146 label-Code-Review = -2..+2 group Project Owners
147 label-Code-Review = -1..+1 group Registered Users
148 label-Verified = -1..+1 group Non-Interactive Users
149 submit = group Administrators
150 submit = group Project Owners
151 editTopicName = +force group Administrators
152 editTopicName = +force group Project Owners
153 [access "refs/meta/config"]
154 exclusiveGroupPermissions = read
155 read = group Administrators
156 read = group Project Owners
157 push = group Administrators
158 push = group Project Owners
159 label-Code-Review = -2..+2 group Administrators
160 label-Code-Review = -2..+2 group Project Owners
161 submit = group Administrators
162 submit = group Project Owners
163 [access "refs/tags/*"]
164 pushTag = group Administrators
165 pushTag = group Project Owners
166 pushSignedTag = group Administrators
167 pushSignedTag = group Project Owners
168 [label "Code-Review"]
169 function = MaxWithBlock
170 copyMinScore = true
171 value = -2 This shall not be merged
172 value = -1 I would prefer this is not merged as is
173 value = 0 No score
174 value = +1 Looks good to me, but someone else must approve
175 value = +2 Looks good to me, approved
176 [label "Verified"]
177 function = MaxWithBlock
178 copyMinScore = true
179 value = -1 Fails
180 value = 0 No score
181 value = +1 Verified
182
Ales Komarek3446a0a2016-03-08 10:21:00 +0100183Read more
184=========
185
Ales Komarek7f93ce22016-08-29 23:27:47 +0200186* https://www.gerritcodereview.com/
Ales Komarekf93ac812016-08-31 19:37:43 +0200187* https://gerrit-review.googlesource.com/Documentation/
Ales Komarek7f93ce22016-08-29 23:27:47 +0200188* https://github.com/openstack-infra/puppet-gerrit/
189* https://gerrit-ci.gerritforge.com/
Ales Komarekf93ac812016-08-31 19:37:43 +0200190* https://github.com/morucci/exzuul