From fe88dba26d1e4d8a58b7e8e8afa3ad26f51bac12 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 13 Sep 2018 17:05:53 +0200 Subject: [PATCH] =?UTF-8?q?Artifact=20named=20after=20their=20path?= =?UTF-8?q?=E2=80=99s=20base=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-task.sh | 2 +- decision-task.py | 2 +- decisionlib.py | 10 +++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/build-task.sh b/build-task.sh index a86d94023b6..1159686da6f 100755 --- a/build-task.sh +++ b/build-task.sh @@ -5,4 +5,4 @@ set -x cd something-rust cargo build --release -gzip -c target/release/something-rust > something-rust.gz +gzip -c target/release/something-rust > executable.gz diff --git a/decision-task.py b/decision-task.py index c69b1cf0000..ba4ceae9b52 100644 --- a/decision-task.py +++ b/decision-task.py @@ -17,7 +17,7 @@ def main(): max_run_time_minutes=20, artifacts=[ - ("executable.gz", "/repo/something-rust/something-rust.gz", "1 week"), + ("/repo/something-rust/executable.gz", "1 week"), ], # https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches diff --git a/decisionlib.py b/decisionlib.py index 4705739b98d..fb9a2ea6599 100644 --- a/decisionlib.py +++ b/decisionlib.py @@ -60,11 +60,7 @@ class DecisionTask: "DOCKERFILE": dockerfile, }, artifacts=[ - ( - self.DOCKER_IMAGE_ARTIFACT_FILENAME, - "/" + self.DOCKER_IMAGE_ARTIFACT_FILENAME, - self.docker_image_cache_expiry - ), + ("/" + self.DOCKER_IMAGE_ARTIFACT_FILENAME, self.docker_image_cache_expiry), ], max_run_time_minutes=20, image=self.DOCKER_IMAGE_BUILDER_IMAGE, @@ -145,12 +141,12 @@ class DecisionTask: ], "env": env, "artifacts": { - "public/" + artifact_name: { + "public/" + os.path.basename(path): { "type": "file", "path": path, "expires": taskcluster.fromNowJSON(expires), } - for artifact_name, path, expires in artifacts or [] + for path, expires in artifacts or [] }, "features": features or {}, },