Log an error on gerrit checks misconfiguration
If a reporter attempts to report via the checks api but ends up using SSH instead of HTTP, log it for the benefit of the operator. Change-Id: If9864a5aaf1e77734a7f23f2187880f5e7f42ba9
This commit is contained in:
parent
c6db86ad38
commit
dfda9bcdf1
|
@ -946,6 +946,11 @@ class GerritConnection(BaseConnection):
|
|||
|
||||
def review_ssh(self, item, message, submit, labels, checks_api,
|
||||
file_comments, zuul_event_id=None):
|
||||
if checks_api:
|
||||
log = get_annotated_logger(self.log, zuul_event_id)
|
||||
log.error("Zuul is configured to report to the checks API, "
|
||||
"but no HTTP password is present for the connection "
|
||||
"in the configuration file.")
|
||||
change = item.change
|
||||
project = change.project.name
|
||||
cmd = 'gerrit review --project %s' % project
|
||||
|
|
Loading…
Reference in New Issue