Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion taskboot/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import logging
import pathlib

from taskboot.config import Configuration
from taskboot.utils import load_named_artifacts
Expand All @@ -20,9 +21,15 @@ def retrieve_artifacts(target, args):
# Load config from file/secret
config = Configuration(args)

# Replace the path to the artifact with the load_named_version format
# worker-type:artifact path
artifacts = [
str(pathlib.Path(artifact).stem) + ":" + artifact for artifact in args.artifacts
]

# Load dependencies artifacts
for _, artifact_name, artifact_path in load_named_artifacts(
config, args.task_id, args.artifacts, args.output_path
config, args.task_id, artifacts, args.output_path
):
logger.info(f"{artifact_name} has been downloaded to {artifact_path}")

Expand Down
2 changes: 1 addition & 1 deletion taskboot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def main():
"--artifacts",
nargs="+",
type=str,
help="the mapping of worker-type:artifact-path to download",
help="Paths to the artifacts to download on the task",
)
download_artifacts.set_defaults(func=retrieve_artifacts)

Expand Down