Artifact named after their path’s base name

This commit is contained in:
Simon Sapin 2018-09-13 17:05:53 +02:00
parent 46ed832b21
commit fe88dba26d
3 changed files with 5 additions and 9 deletions

View file

@ -5,4 +5,4 @@ set -x
cd something-rust cd something-rust
cargo build --release cargo build --release
gzip -c target/release/something-rust > something-rust.gz gzip -c target/release/something-rust > executable.gz

View file

@ -17,7 +17,7 @@ def main():
max_run_time_minutes=20, max_run_time_minutes=20,
artifacts=[ 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 # https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches

View file

@ -60,11 +60,7 @@ class DecisionTask:
"DOCKERFILE": dockerfile, "DOCKERFILE": dockerfile,
}, },
artifacts=[ artifacts=[
( ("/" + self.DOCKER_IMAGE_ARTIFACT_FILENAME, self.docker_image_cache_expiry),
self.DOCKER_IMAGE_ARTIFACT_FILENAME,
"/" + self.DOCKER_IMAGE_ARTIFACT_FILENAME,
self.docker_image_cache_expiry
),
], ],
max_run_time_minutes=20, max_run_time_minutes=20,
image=self.DOCKER_IMAGE_BUILDER_IMAGE, image=self.DOCKER_IMAGE_BUILDER_IMAGE,
@ -145,12 +141,12 @@ class DecisionTask:
], ],
"env": env, "env": env,
"artifacts": { "artifacts": {
"public/" + artifact_name: { "public/" + os.path.basename(path): {
"type": "file", "type": "file",
"path": path, "path": path,
"expires": taskcluster.fromNowJSON(expires), "expires": taskcluster.fromNowJSON(expires),
} }
for artifact_name, path, expires in artifacts or [] for path, expires in artifacts or []
}, },
"features": features or {}, "features": features or {},
}, },