chore(canceller): generalize it to any project
Just iterate over all project names. Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
parent
87a9b9df01
commit
b417cd4519
|
@ -797,6 +797,8 @@ class GerritNixConfigurator(ConfiguratorBase):
|
|||
# startCB, summaryCB are too noisy, we won't use them.
|
||||
)
|
||||
|
||||
# Upstream defaults pretend they already do something similar
|
||||
# but they didn't work, hence the custom function.
|
||||
def gerritBranchKey(b):
|
||||
ref = b['branch']
|
||||
if not ref.startswith('refs/changes/'):
|
||||
|
@ -805,18 +807,19 @@ class GerritNixConfigurator(ConfiguratorBase):
|
|||
|
||||
config["services"].append(
|
||||
util.OldBuildCanceller(
|
||||
"lix_build_canceller",
|
||||
"build_canceller",
|
||||
filters=[
|
||||
(
|
||||
[
|
||||
f"lix/nix-{kind}"
|
||||
f"{project}/nix-{kind}"
|
||||
for kind in [ "eval" ] + [
|
||||
f"build/{arch}"
|
||||
for arch in self.nix_supported_systems + [ "other" ]
|
||||
]
|
||||
],
|
||||
util.SourceStampFilter(project_eq=["lix"])
|
||||
util.SourceStampFilter(project_eq=[project])
|
||||
)
|
||||
for project in self.projects
|
||||
],
|
||||
branch_key=gerritBranchKey
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue