mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Make routed artifacts expire when the route does
This commit is contained in:
parent
b7e9566587
commit
c7234642a3
2 changed files with 7 additions and 3 deletions
|
@ -82,7 +82,7 @@ def main():
|
||||||
target/release/build/osmesa-src-*/out/lib/gallium
|
target/release/build/osmesa-src-*/out/lib/gallium
|
||||||
""",
|
""",
|
||||||
artifacts=[
|
artifacts=[
|
||||||
("/target.tar.gz", build_artifacts_expiry),
|
"/target.tar.gz",
|
||||||
],
|
],
|
||||||
**build_kwargs
|
**build_kwargs
|
||||||
)
|
)
|
||||||
|
|
|
@ -46,7 +46,7 @@ class DecisionTask:
|
||||||
def from_now_json(self, offset):
|
def from_now_json(self, offset):
|
||||||
return taskcluster.stringDate(taskcluster.fromNow(offset, dateObj=self.now))
|
return taskcluster.stringDate(taskcluster.fromNow(offset, dateObj=self.now))
|
||||||
|
|
||||||
def find_or_create_task(self, *, route_bucket, route_key, route_expiry, **kwargs):
|
def find_or_create_task(self, *, route_bucket, route_key, route_expiry, artifacts, **kwargs):
|
||||||
route = "%s.%s.%s" % (self.route_prefix, route_bucket, route_key)
|
route = "%s.%s.%s" % (self.route_prefix, route_bucket, route_key)
|
||||||
|
|
||||||
task_id = self.found_or_created_routes.get(route)
|
task_id = self.found_or_created_routes.get(route)
|
||||||
|
@ -67,6 +67,10 @@ class DecisionTask:
|
||||||
"expires": self.from_now_json(self.docker_image_cache_expiry),
|
"expires": self.from_now_json(self.docker_image_cache_expiry),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
artifacts=[
|
||||||
|
(artifact, route_expiry)
|
||||||
|
for artifact in artifacts
|
||||||
|
],
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -94,7 +98,7 @@ class DecisionTask:
|
||||||
"DOCKERFILE": dockerfile_contents,
|
"DOCKERFILE": dockerfile_contents,
|
||||||
},
|
},
|
||||||
artifacts=[
|
artifacts=[
|
||||||
("/" + self.DOCKER_IMAGE_ARTIFACT_FILENAME, self.docker_image_cache_expiry),
|
"/" + self.DOCKER_IMAGE_ARTIFACT_FILENAME,
|
||||||
],
|
],
|
||||||
max_run_time_minutes=20,
|
max_run_time_minutes=20,
|
||||||
docker_image=self.DOCKER_IMAGE_BUILDER_IMAGE,
|
docker_image=self.DOCKER_IMAGE_BUILDER_IMAGE,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue