only have bootserv do staging branch by default

pull/244/head
Jeff Becker 5 years ago
parent 0bf5e96e38
commit 6383ee994a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -180,12 +180,22 @@ def handle_serve_lokinet(modified_since, respond):
return l.serve(modified_since, respond)
def fetch_lokinet(j):
def fetch_lokinet(j, ref="staging", name="build:linux"):
holder = BinHolder("lokinet.zip")
if 'builds' not in j:
return False
selected = None
attrs = dict()
if 'object_attributes' in j:
attrs = j['object_attributes']
if 'ref' not in attrs or attrs["ref"] != ref:
return True
for build in j['builds']:
if 'name' not in build or build['name'] != name:
continue
if 'status' not in build or build['status'] != 'success':
continue
if 'finished_at' not in build or build['finished_at'] is None:
continue
if holder.is_new(build['finished_at']):

Loading…
Cancel
Save