Don't rely on report-build-page when building the buildset result url
The documentation states that this flag is used to report the builds page instead of the log url on a per-job base. While this is totally fine, I don't think we should rely on this flag when building the status/result url for the whole buildset. Change-Id: I029063aec591a14a5225b2c6c6a9123a4daa6ca7
This commit is contained in:
parent
35333dcb12
commit
a8bd0da040
|
@ -2747,25 +2747,28 @@ class QueueItem(object):
|
|||
return self.formatProvisionalJobResult(job)
|
||||
|
||||
def formatStatusUrl(self):
|
||||
# If we don't have a web root set, we can't format any url
|
||||
if not self.pipeline.tenant.web_root:
|
||||
# Apparently we have no website
|
||||
return None
|
||||
|
||||
if self.current_build_set.result:
|
||||
# We have reported (or are reporting) and so we should
|
||||
# send the buildset page url
|
||||
if (self.pipeline.tenant.report_build_page and
|
||||
self.pipeline.tenant.web_root):
|
||||
pattern = urllib.parse.urljoin(self.pipeline.tenant.web_root,
|
||||
'buildset/{buildset.uuid}')
|
||||
return self.formatUrlPattern(pattern)
|
||||
pattern = urllib.parse.urljoin(
|
||||
self.pipeline.tenant.web_root, "buildset/{buildset.uuid}"
|
||||
)
|
||||
return self.formatUrlPattern(pattern)
|
||||
|
||||
# We haven't reported yet (or we don't have a database), so
|
||||
# the best we can do at the moment is send the status page
|
||||
# url. TODO: require a database, insert buildsets into it
|
||||
# when they are created, and remove this case.
|
||||
if self.pipeline.tenant.web_root:
|
||||
pattern = urllib.parse.urljoin(
|
||||
self.pipeline.tenant.web_root,
|
||||
'status/change/{change.number},{change.patchset}')
|
||||
return self.formatUrlPattern(pattern)
|
||||
# Apparently we have no web site.
|
||||
return None
|
||||
pattern = urllib.parse.urljoin(
|
||||
self.pipeline.tenant.web_root,
|
||||
"status/change/{change.number},{change.patchset}",
|
||||
)
|
||||
return self.formatUrlPattern(pattern)
|
||||
|
||||
def formatProvisionalJobResult(self, job):
|
||||
build = self.current_build_set.getBuild(job.name)
|
||||
|
|
Loading…
Reference in New Issue