mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Disallow duplicate taskcluster artifacts.
This commit is contained in:
parent
500cb865bd
commit
5d923c0a95
2 changed files with 13 additions and 3 deletions
|
@ -387,7 +387,10 @@ class GenericWorkerTask(Task):
|
|||
|
||||
Paths are relative to the task’s home directory.
|
||||
"""
|
||||
self.artifacts.extend((type, path) for path in paths)
|
||||
for path in paths:
|
||||
if (type, path) in self.artifacts:
|
||||
raise ValueError("Duplicate artifact: " + path) # pragma: no cover
|
||||
self.artifacts.append(tuple((type, path)))
|
||||
return self
|
||||
|
||||
def with_features(self, *names):
|
||||
|
@ -736,13 +739,19 @@ class DockerWorkerTask(UnixTaskMixin, Task):
|
|||
|
||||
with_docker_image = chaining(setattr, "docker_image")
|
||||
with_max_run_time_minutes = chaining(setattr, "max_run_time_minutes")
|
||||
with_artifacts = chaining(append_to_attr, "artifacts")
|
||||
with_script = chaining(append_to_attr, "scripts")
|
||||
with_early_script = chaining(prepend_to_attr, "scripts")
|
||||
with_caches = chaining(update_attr, "caches")
|
||||
with_env = chaining(update_attr, "env")
|
||||
with_capabilities = chaining(update_attr, "capabilities")
|
||||
|
||||
def with_artifacts(self, *paths):
|
||||
for path in paths:
|
||||
if path in self.artifacts:
|
||||
raise ValueError("Duplicate artifact: " + path) # pragma: no cover
|
||||
self.artifacts.append(path)
|
||||
return self
|
||||
|
||||
def build_worker_payload(self):
|
||||
"""
|
||||
Return a `docker-worker` worker payload.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue