feat: support Gerrit in Buildbot #1
|
@ -865,6 +865,30 @@ class GerritNixConfigurator(ConfiguratorBase):
|
|||
|
||||
)
|
||||
|
||||
def gerritBranchKey(b):
|
||||
ref = b['branch']
|
||||
if not ref.startswith('refs/changes/'):
|
||||
return ref
|
||||
return ref.rsplit('/', 1)[0]
|
||||
config["services"].append(
|
||||
util.OldBuildCanceller(
|
||||
"lix_build_canceller",
|
||||
filters=[
|
||||
(
|
||||
[
|
||||
f"lix/nix-{kind}"
|
||||
for kind in [ "eval" ] + [
|
||||
f"build/{arch}"
|
||||
for arch in self.nix_supported_systems + [ "other" ]
|
||||
]
|
||||
],
|
||||
util.SourceStampFilter(project_eq=["lix"])
|
||||
)
|
||||
],
|
||||
branch_key=gerritBranchKey
|
||||
)
|
||||
)
|
||||
|
||||
systemd_secrets = secrets.SecretInAFile(
|
||||
dirname=os.environ["CREDENTIALS_DIRECTORY"],
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue