Skip to content

Commit

Permalink
Merge pull request #578 from chengshifan/gerrit-debug
Browse files Browse the repository at this point in the history
[DM01-4872] adapt Infrabox Gerrit to the Gerrit with new backend GCP
  • Loading branch information
chengshifan authored Mar 27, 2024
2 parents e31c98a + 404b150 commit e1f5426
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ https://{{- required "host is required" .Values.host -}}:{{- .Values.port -}}
-
name: INFRABOX_GERRIT_PORT
value: {{ default "29418" .Values.gerrit.port | quote }}
-
name: INFRABOX_GERRIT_CLONE_PORT
value: {{ default "39418" .Values.gerrit.clone_port | quote }}
{{ end }}
{{ end }}

Expand Down Expand Up @@ -561,4 +564,4 @@ https://{{- .Values.ha.global_host -}}:{{- .Values.ha.global_port -}}
hostPath:
path: {{ .Values.dev.repo_path }}
{{ end }}
{{ end }}
{{ end }}
3 changes: 3 additions & 0 deletions deploy/infrabox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ gerrit:
# Port
port: 29418

# Clone Port
clone_port: 39418

# Github configuration
github:
# Enable Github
Expand Down
3 changes: 2 additions & 1 deletion src/gerrit/trigger/trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def handle_patchset_created_project(conn, event, project_id, project_name):
"GERRIT_TOPIC": event['change'].get('topic', ""),
"GERRIT_HOST": get_env('INFRABOX_GERRIT_HOSTNAME'),
"GERRIT_PORT": get_env('INFRABOX_GERRIT_PORT'),
"GERRIT_CLONE_PORT": get_env('INFRABOX_GERRIT_CLONE_PORT'),
}

if event.get('uploader', None):
Expand All @@ -209,7 +210,7 @@ def handle_patchset_created_project(conn, event, project_id, project_name):
"commit": sha,
"clone_url": "ssh://%s@%s:%s/%s" % (get_env('INFRABOX_GERRIT_USERNAME'),
get_env('INFRABOX_GERRIT_HOSTNAME'),
get_env('INFRABOX_GERRIT_PORT'),
get_env('INFRABOX_GERRIT_CLONE_PORT'),
project_name),
"ref": event['patchSet']['ref'],
"event": event['change']['branch']
Expand Down

0 comments on commit e1f5426

Please sign in to comment.