feat: support Gerrit in Buildbot #1

Merged
qyriad merged 46 commits from gerrit into main 2024-04-30 19:42:02 +00:00
Showing only changes of commit 9a15348984 - Show all commits

View file

@ -153,6 +153,7 @@ class BuildTrigger(steps.BuildStep):
@defer.inlineCallbacks
def run(self):
self.running = True
build_props = self.build.getProperties()
source = f"nix-eval-lix"
@ -184,7 +185,7 @@ class BuildTrigger(steps.BuildStep):
failed = []
all_results = SUCCESS
ss_for_trigger = self.prepareSourcestampListForTrigger()
while len(build_schedule_order) > 0 or len(scheduled) > 0:
while not self.ended and (len(build_schedule_order) > 0 or len(scheduled) > 0):
print('Scheduling..')
schedule_now = []
for build in list(build_schedule_order):
@ -229,11 +230,10 @@ class BuildTrigger(steps.BuildStep):
print(f' Found finished build {job.get("attr")}, result {util.Results[result].upper()}')
if result != SUCCESS:
failed_checks = []
failed_paths = []
failed_paths = [job.get('drvPath')]
removed = []
while True:
old_paths = list(failed_paths)
print(failed_checks, old_paths)
for build in list(build_schedule_order):
deps = all_deps.get(build.get("drvPath"), [])
for path in old_paths:
@ -253,6 +253,8 @@ class BuildTrigger(steps.BuildStep):
if job.get("drvPath") in all_deps[dep]:
all_deps[dep].remove(job.get("drvPath"))
print('Done!')
if self.ended:
return util.CANCELLED
return all_results
def getCurrentSummary(self) -> dict[str, str]: # noqa: N802