Commit Graph

141 Commits

Author SHA1 Message Date
Monty Taylor eff363f158 Retire repo
Depends-On: https://review.opendev.org/720892
Change-Id: Ib75cd0861d5f20f9ccacf96d38be81122dac75de
2020-04-22 10:18:58 -05:00
Monty Taylor 43f8067c00 Add support for replicateOnStartup config option
Gerrit supports turning off the automatic full replication on startup.
The default config value is on, so set the default here to on as well
so that this is not a behavior change. OpenDev will want to set this
to false.

Change-Id: Ibb16d212ace90750ced51ff43e714532144f577c
2019-08-26 10:12:29 +02:00
Clark Boylan 8a0af16d17 Increase Gerrit startup timeout to 300 seconds
The default is now 90 seconds and we run into that and timeout which
confuses systemd. To avoid confusing systemd increase the timeout to its
old value of 300 seconds which worked back with older Gerrit. Hopefully
this doesn't confuse systemd anymore.

Change-Id: I8476c832f950e18035e11f225202eff8572f5ce8
2019-05-29 08:08:24 -07:00
Monty Taylor 7c43778f2f Fix gitweb link config
We need to set type = gitweb. Also, the gitweb script itself
is in /usr/share from the git package.

Change-Id: I7e73a0ba721ed93e4acf308821ad3efd3d5eb4c8
2019-05-02 16:38:46 +00:00
Monty Taylor 0d533a9a94 Add support for gitea links
If we want to link directly to opendev urls, we need gerrit to
understand what the link structure looks like. Add support.

Change-Id: I8efefe365f3b9ebe97c8c2ce322fa8c6f3b70b3a
2019-04-20 18:15:01 +00:00
Monty Taylor a7422e3645 Fix opendev urls
Change-Id: I7e26218e5787870080254a4a8d74f9220dd9915f
2019-04-20 18:07:28 +00:00
David Moreau Simard 4dac913508
Add support for enabling replication configuration autoReload
This will allow us to change the replication configuration without
requiring a restart of gerrit [1].

[1]: https://gerrit.googlesource.com/plugins/replication/+doc/master/src/main/resources/Documentation/config.md

Change-Id: Ia360a18f1cfb88800f4c644d8ebd0fe2c2b08b31
2019-04-04 11:12:19 -04:00
Monty Taylor 8cfffc49bc
Add support for specifying which refs to replicate
Sometimes one would like to only replicate a subset of the refs in
a git repo, such as not replicating refs/changes.

Change-Id: Ibf6c02d59c6901f82be6a96b676b1bd28c4b61f7
2019-01-09 21:20:06 +00:00
Zuul 14a2c2dba8 Merge "Allow lists of trackingid footers" 2018-12-21 21:33:59 +00:00
Jeremy Stanley 4af0bfe7d4 Allow lists of trackingid footers
Gerrit allows for multiple footers in a single trackingid. If a
footers list is provided, iterate through all its entries; if not
though, we should continue supporting the old footer string
as a fallback.

Change-Id: I99e16246e81b7ebc50e96054a2e3790aed0089bc
2017-09-22 17:38:59 +00:00
Monty Taylor dce6e65c8e
Override the cgit url settings in gerrit
The upstream ones add a .git. That does't work.

Values taken from:

  http://git.openstack.org/cgit/openstack-infra/gerrit/tree/gerrit-server/src/main/java/com/google/gerrit/server/config/GitwebConfig.java?h=openstack/2.13.8#n158

Change-Id: I197bc90b58db9e7048cc9a3892ef3dcfa575598f
2017-09-19 16:21:20 -05:00
James E. Blair 9740afe771 Allow configuring account/group cache limits
Change-Id: Iedb9fae62b133d76efeac5c8ecffde49704828c2
2017-09-19 09:47:45 -07:00
Jeremy Stanley c3c680a19c Stop supporting the Contact Store feature
Gerrit, as of 2.12, no longer implements the Contact Store
subfeature for their contributor agreement implementation.
OpenStack's Gerrit deployment no longer relies on this, and it's
likely they were the only actual consumer to start with so probably
safe to clean up at this point.

Change-Id: I50572d436b9d59a6184576adb5c27a3fc0fbec04
Depends-On: I8c39a6bf43f5b12db3e8aab18bedbf7e1a0f0b7e
Story: #2001094
Task: #4869
2017-08-07 18:16:56 +00:00
Clark Boylan 73fa243422 Explicitly enable utf8 on jdbc connection url
Testing on review-dev has shown that newer gerrit won't support utf8
properly unless we explicitly enable utf8 on the mysql jdbc string.
Without this non ascii characters get entered into the db as literal
"?". Go ahead and add explicit utf8 parameters to the database url in
this change.

Note that this should be safe on older gerrit too as gerrit should
ignore any config options it doesn't know about.

Change-Id: Ib097f93951904951a285ec40a21096988fb13562
2017-07-25 10:50:51 -07:00
Clark Boylan a52cab89f3 Support setting accountPatchReviewDb.url in config
Add accountPatchReviewDb.url as a configurable option to the secure
config file (we put it in secure config as the url likely contains a
database password in it). This is a new database in Gerrit 2.13 which
will default to using an H2 db in review_site/db if a url is not
specified.

Note that this database must have a different name than the review
database (called 'reviewdb' by this module) and if they are the same
that database will be dropped and you will have a sad afternoon.

Change-Id: Ifc04395f076200a68e6398190a0712c80e5278c6
2017-06-27 09:56:31 -07:00
James E. Blair 0f8fc12999 Add apache2.4 acls and permission to gerrit static dir
We serve robots.txt out of the gerrit static dir, but did not allow
apache to access it.  This corrects that.

Change-Id: Ibf7338641247bb5f66e3a9d7be92ce45a72da1fd
2016-09-26 08:52:11 -07:00
Khai Do 188e34af98 fix its_rules parameterization in template
The 'event-type' reference should be 'event_type' instead.
Also fixed a bug in the documentation and subsequent beaker test.

Change-Id: I4802f49e1fb1d3210aa49b4fe12a6e33a9f3bd42
2016-08-05 16:30:02 +00:00
Khai Do 7128938119 Add configurations for gerrit its plugins
This change will allow puppet to configure the its-storyboard plugin.
Settings in gerrit.config and secure.config is to associate gerrit
with an its plugin and settings in actions.config is to tell the
plugin to do something when a gerrit change gets updated. These
conditions are provided by the its-base plugin[1].

[1] https://gerrit.googlesource.com/plugins/its-base/+/stable-2.11/src/main/resources/Documentation/config-common.md
Change-Id: I9f47a2ed88ffbe827e494a478c0dc89a08bbe370
2016-07-20 11:22:44 -07:00
Jenkins 4d559ab5ca Merge "Allow puppet to configure gerrit commitmessage parameters" 2016-07-20 17:59:38 +00:00
Jenkins 6abd30a80d Merge "Allow puppet to configure Gerrit's canonicalGitUrl option" 2016-07-19 20:43:29 +00:00
Khai Do c2824df95c Allow puppet to configure gerrit commitmessage parameters
Allow puppet to configure the Gerrit's commitmessage[1] options

[1] https://review.openstack.org/plugins/commit-message-length-validator/Documentation/config.html

Change-Id: Id7aff7d6d7250da804c690fbe6ff5b81f408d113
2016-07-18 10:08:09 -07:00
Khai Do 0b209db93b Refactor to accept java_home from parent modules
The java_home is needed in review.pp and review-dev.pp (in
system-config) so instead of defining it in here allow a parent
module to pass in the value.

Change-Id: I5e817fab8a8973b688fd44dd819e3616df171321
2016-07-15 11:26:20 -07:00
Gregory Haynes 8573c2ee17 Remove text/html as a safe mimetype
The non-default safe mimetype in gerrit exists purely to proect installs
against setting this - when set, downloading a text/html file will
result in that file being rendered.

Change-Id: I648ada0b26aaf35ece9ef57f609b46f23f6e422a
2016-06-21 15:43:34 +00:00
Monty Taylor ba011b19a7
Change default login cache length to 7 days
The previous value, 2m, actually means 2 minutes, which is not in line
with the stated desires in the patch. After discussion in IRC, it seems
that people are less comfortable with 2 months. Let's try 7 days.

Change-Id: I95c20373d572b061e870103a813fef1d25de4b23
2016-05-02 18:16:33 -05:00
Jenkins bc0447b7b6 Merge "Set gerrit login cache to 2m" 2016-04-21 19:20:41 +00:00
Khai Do 6f42cb9dc0 Allow puppet to configure Gerrit's download protocols
Gerrit 2.11 has a download[1] option that allows customization
of download commands and schemes.  Allow puppet to configure
this so we can customize it.

[1] https://review.openstack.org/Documentation/config-gerrit.html#download

Change-Id: Ia6a3a28cce62b6bd1570fd0ab5b1224fc35d8284
2016-04-08 16:30:04 -07:00
Khai Do 4edbd2a8fa Allow puppet to configure Gerrit's canonicalGitUrl option
Gerrit 2.11 has a gerrit.canonicalWebUrl[1] option that will display
an alternative git repo location to users using the git protocol.

[1] https://review.openstack.org/Documentation/
          config-gerrit.html#gerrit.canonicalGitUrl

Change-Id: I5bd57d91b4d4a685328efe4d589a191debaa0fe5
2016-04-01 11:30:45 -07:00
Khai Do 6b4228cf4b Allow puppet to configure Gerrit's gitHttpUrl option
Gerrit 2.11 has a gerrit.gitHttpUrl[1] option that will display an
alternative git repo location to users.

[1] https://review.openstack.org/Documentation/config-gerrit.html#gerrit.gitHttpUrl

Change-Id: I4fa1cc7b1f0b717c35dc4eccedb635c9f3680c26
2016-03-31 12:00:17 -07:00
Robert Collins a1245cb330 Set gerrit login cache to 2m
This allows folk to go on holiday or whatever and not have to deal
with Gerrits rough handling of session expiry.

Change-Id: I39aff380aa6a41ba61efebfb4691bc6727d453ce
2016-03-22 10:31:24 +13:00
Khai Do 1a7e671d40 Allow configuration of Gerrit httpd.maxQueued option
Allow puppet to configure the Gerrit 2.11 httpd.maxQueued[1]
option.

[1] https://gerrit-documentation.storage.googleapis.com/
       Documentation/2.11/config-gerrit.html#httpd.maxQueued

Change-Id: Iea202fcfe7af4a9d5b4c3a360124c24649b1133b
2016-02-03 21:48:42 -08:00
Khai Do 91de91d1a6 Allow puppet to configure the Gerrit's sshd.batchThreads option
Gerrit 2.11 has a sshd.batchThreads[1] option that will create
a seperate queue for ssh requests from non-inertactive users.

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#sshd.batchThreads

Change-Id: I1dd229dec0aa64616e620caf51105a77c9190ece
2016-01-12 09:20:47 -08:00
Jenkins 38162a6ad0 Merge "Allow puppet to configure Gerrit diff timeout options" 2016-01-07 21:36:47 +00:00
Jenkins e95d84183b Merge "Allow puppet to set Gerrit sshd options to control connections" 2016-01-07 21:32:43 +00:00
Khai Do 8dd4b79a80 Allow puppet to set Gerrit sshd options to control connections
Allow puppet to set Gerrit's sshd.idleTimeout[1] and
sshd.maxConnectionsPerUser options to help control the
number of incoming ssh connections.

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#sshd.idleTimeout

Change-Id: I34e5fd4ea332779c4fd97f8bf5c5abf5053320c4
2016-01-04 17:23:50 -08:00
Khai Do a354d55f2b Allow puppet to configure Gerrit diff timeout options
Gerrit has options to configure the diff and intraline timeouts[1],
setup puppet to allow overriding those configs.

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#cache.diff.timeout

Change-Id: I038211be70d25baf8fade55fd42bcefe77409204
2016-01-04 16:11:01 -08:00
Jenkins 23c6c6675f Merge "Allow puppet to configure Gerrit's receive.maxObjectSizeLimit option" 2016-01-04 23:14:49 +00:00
Jenkins 3951bf9121 Merge "Fix to allow Gerrit to download html files directly" 2016-01-04 23:14:11 +00:00
Jenkins 84c152182b Merge "Allow direct download of .properties files" 2016-01-04 23:07:09 +00:00
Jenkins 537eebcdd9 Merge "Fix Gerrit's puppet mimetype specifier" 2016-01-04 23:06:24 +00:00
Jenkins c46431f3ce Merge "Allow puppet to configure the Gerrit's garbage collection options" 2016-01-04 23:05:32 +00:00
Jenkins 12b52c3d17 Merge "Allow puppet to configure the Gerrit's sendmail.includeDiff option" 2016-01-04 23:05:26 +00:00
Khai Do 249e4b2314 Allow puppet to configure Gerrit's receive.maxObjectSizeLimit option
Setup puppet to schedule Gerrit's receive.maxObjectSizeLimit option[1]

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#receive.maxObjectSizeLimit

Change-Id: Iad06bfc421ce73aeb1e1496f86cc244624599bec
2015-12-30 12:31:36 -08:00
Khai Do 3da6822732 Fix to allow Gerrit to download html files directly
Direct download of html files was not working because the gerrit
config was missing a mimetype setting[1].  The code mirror
documentation[2] indicates that it requires both 'application/xml'
and 'text/html'.

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#mimetype
[2] https://codemirror.net/mode/xml/index.html

Change-Id: Ia2c64533cf7cb268525e8e1db4bb77712db420f5
2015-12-30 11:57:04 -08:00
Khai Do fd60f7ef8d Allow direct download of .properties files
Tell Gerrit that .properties files are safe so that users can
download the file without having packaged inside of a zip.  To do
this we need to set the Code Mirror[1] mimetype in Gerrit config[2]

[1] https://codemirror.net/mode/properties/index.html
[2] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#mimetype

Change-Id: I53dd26bb3de7c49f64c5179275d8667f500a35f8
2015-12-30 11:44:17 -08:00
Khai Do 463a313544 Fix Gerrit's puppet mimetype specifier
Gerrit uses code mirror and the mimetype[2] for puppet is
'x-puppet'[2] not 'pp'.

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#mimetype
[2] https://codemirror.net/mode/puppet/index.html

Change-Id: I8518bb724848bfc4be7cbe5ec5829f4c44a0e5b3
2015-12-30 11:37:39 -08:00
Khai Do e5034f2e6d Allow puppet to configure the Gerrit's garbage collection options
Setup puppet to schedule Gerrit's git garbage collection options[1].

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#gc

Change-Id: I73166de7008ceb42db3db4a8b22fb6e9c94e790d
2015-12-28 12:19:57 -08:00
Morgan Fainberg f7b9c992cd Add proxy status to server-status page
Add the mod_proxy status info to the server-status page.

Change-Id: If6d2aede2b4bbf4ba0754f0bf780e680646c3430
2015-12-28 11:15:01 -08:00
Khai Do a26f55999a Allow puppet to configure the Gerrit's sendmail.includeDiff option
Gerrit 2.11 has a new sendmail.includeDiff[1] option that when set to true
will add the unified diff info of that change in the notification email.
This change allows puppet to configure this setting.

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/
        2.11/config-gerrit.html#sendemail.includeDiff

Change-Id: I28043548e5ec9b00e9446445efb0299792ce5540
2015-12-21 17:07:12 -08:00
James E. Blair 69b1212fb6 Do not proxy /server-status
Change-Id: Iba6080c4a6b36014b9cf97c2a25287f90fe977ff
2015-12-14 08:20:26 -08:00
Jenkins 6d6244e831 Merge "Allow puppet to configure the Gerrit drafts feature" 2015-12-11 19:22:16 +00:00