Skip to content

Commit 899fade

Browse files
Microzuul CIGerrit Code Review
authored andcommitted
Merge "Gerrit Connection: add 'stream-events' option"
2 parents 21c4480 + 50aad78 commit 899fade

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

api/v1/softwarefactory_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ type GerritConnection struct {
155155
GitOverSSH bool `json:"git-over-ssh,omitempty"`
156156
// Disable SSL certificate verification with the Gerrit instance when set to false. Equivalent to the [verify_ssl](https://zuul-ci.org/docs/zuul/latest/drivers/gerrit.html#attr-%3Cgerrit%20ssh%20connection%3E.verify_ssl) parameter.
157157
VerifySSL *bool `json:"verifyssl,omitempty"`
158+
// Undocumented option; if set to False this connection won't stream events; instead it will poll for merged patches every minute or so.
159+
StreamEvents *bool `json:"stream-events,omitempty"`
158160
}
159161

160162
// Describes a Zuul connection using the [pagure driver](https://zuul-ci.org/docs/zuul/latest/drivers/pagure.html#connection-configuration).

api/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/sf.softwarefactory-project.io_softwarefactories.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,11 @@ spec:
674674
Gerrit user's SSH key. The secret's data must have a key
675675
called "priv".
676676
type: string
677+
stream-events:
678+
description: Undocumented option; if set to False this connection
679+
won't stream events; instead it will poll for merged patches
680+
every minute or so.
681+
type: boolean
677682
username:
678683
description: Username that Zuul will use to authenticate
679684
on the Gerrit instance. Equivalent to the [user](https://zuul-ci.org/docs/zuul/latest/drivers/gerrit.html#attr-%3Cgerrit%20connection%3E.user)

controllers/zuul.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,9 @@ func (r *SFController) AddGerritConnection(cfg *ini.File, conn sfv1.GerritConnec
12031203
if conn.GitOverSSH {
12041204
cfg.Section(section).NewKey("git_over_ssh", "true")
12051205
}
1206+
if conn.StreamEvents != nil && !*conn.StreamEvents {
1207+
cfg.Section(section).NewKey("stream_events", "false")
1208+
}
12061209
}
12071210

12081211
// addKeyToSection add a tuple to the Section if the fieldValue is not empty

doc/reference/api/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ _Appears in:_
121121
| `sshkey` _string_ | The name of a Kubernetes secret holding the Gerrit user's SSH key. The secret's data must have a key called "priv". | -|
122122
| `git-over-ssh` _boolean_ | Set to true to force git operations over SSH even if the password attribute is set. Equivalent to the [git_over_ssh](https://zuul-ci.org/docs/zuul/latest/drivers/gerrit.html#attr-%3Cgerrit%20ssh%20connection%3E.git_over_ssh) parameter. | -|
123123
| `verifyssl` _boolean_ | Disable SSL certificate verification with the Gerrit instance when set to false. Equivalent to the [verify_ssl](https://zuul-ci.org/docs/zuul/latest/drivers/gerrit.html#attr-%3Cgerrit%20ssh%20connection%3E.verify_ssl) parameter. | -|
124+
| `stream-events` _boolean_ | Undocumented option; if set to False this connection won't stream events; instead it will poll for merged patches every minute or so. | -|
124125

125126

126127
#### GitConnection

0 commit comments

Comments
 (0)