Skip to content

Commit e1f5426

Browse files
authored
Merge pull request #578 from chengshifan/gerrit-debug
[DM01-4872] adapt Infrabox Gerrit to the Gerrit with new backend GCP
2 parents e31c98a + 404b150 commit e1f5426

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

deploy/infrabox/templates/_helpers.tpl

+4-1
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ https://{{- required "host is required" .Values.host -}}:{{- .Values.port -}}
280280
-
281281
name: INFRABOX_GERRIT_PORT
282282
value: {{ default "29418" .Values.gerrit.port | quote }}
283+
-
284+
name: INFRABOX_GERRIT_CLONE_PORT
285+
value: {{ default "39418" .Values.gerrit.clone_port | quote }}
283286
{{ end }}
284287
{{ end }}
285288

@@ -561,4 +564,4 @@ https://{{- .Values.ha.global_host -}}:{{- .Values.ha.global_port -}}
561564
hostPath:
562565
path: {{ .Values.dev.repo_path }}
563566
{{ end }}
564-
{{ end }}
567+
{{ end }}

deploy/infrabox/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ gerrit:
204204
# Port
205205
port: 29418
206206

207+
# Clone Port
208+
clone_port: 39418
209+
207210
# Github configuration
208211
github:
209212
# Enable Github

src/gerrit/trigger/trigger.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def handle_patchset_created_project(conn, event, project_id, project_name):
192192
"GERRIT_TOPIC": event['change'].get('topic', ""),
193193
"GERRIT_HOST": get_env('INFRABOX_GERRIT_HOSTNAME'),
194194
"GERRIT_PORT": get_env('INFRABOX_GERRIT_PORT'),
195+
"GERRIT_CLONE_PORT": get_env('INFRABOX_GERRIT_CLONE_PORT'),
195196
}
196197

197198
if event.get('uploader', None):
@@ -209,7 +210,7 @@ def handle_patchset_created_project(conn, event, project_id, project_name):
209210
"commit": sha,
210211
"clone_url": "ssh://%s@%s:%s/%s" % (get_env('INFRABOX_GERRIT_USERNAME'),
211212
get_env('INFRABOX_GERRIT_HOSTNAME'),
212-
get_env('INFRABOX_GERRIT_PORT'),
213+
get_env('INFRABOX_GERRIT_CLONE_PORT'),
213214
project_name),
214215
"ref": event['patchSet']['ref'],
215216
"event": event['change']['branch']

0 commit comments

Comments
 (0)