summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend/cli.py
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.co.uk>2019-08-29 12:32:21 +0100
committerJames Ennis <james.ennis@codethink.co.uk>2019-08-29 12:32:21 +0100
commit8e654015c2eccd62d538ae6d39e78524913775b2 (patch)
tree69ffa840f3dbc253295bd48514f52bebceb6b66b /src/buildstream/_frontend/cli.py
parentbbb5704d8776fc6f92a4776faabbc6352114d744 (diff)
downloadbuildstream-jennis/deps_for_push.tar.gz
cli.py: Allow pull to handle artifact refsjennis/deps_for_push
This patch adds support for the handling of artifact refs in bst artifact pull. A test for this has also been added.
Diffstat (limited to 'src/buildstream/_frontend/cli.py')
-rw-r--r--src/buildstream/_frontend/cli.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 40d73e36c..80b7479eb 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -1132,10 +1132,10 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, compression,
help='The dependency artifacts to pull (default: none)')
@click.option('--remote', '-r', default=None,
help="The URL of the remote cache (defaults to the first configured cache)")
-@click.argument('elements', nargs=-1,
+@click.argument('artifacts', nargs=-1,
type=click.Path(readable=False))
@click.pass_obj
-def artifact_pull(app, elements, deps, remote):
+def artifact_pull(app, artifacts, deps, remote):
"""Pull a built artifact from the configured remote artifact cache.
Specifying no elements will result in pulling the default targets
@@ -1159,12 +1159,12 @@ def artifact_pull(app, elements, deps, remote):
with app.initialized(session_name="Pull"):
ignore_junction_targets = False
- if not elements:
- elements = app.project.get_default_targets()
+ if not artifacts:
+ artifacts = app.project.get_default_targets()
# Junction elements cannot be pulled, exclude them from default targets
ignore_junction_targets = True
- app.stream.pull(elements, selection=deps, remote=remote,
+ app.stream.pull(artifacts, selection=deps, remote=remote,
ignore_junction_targets=ignore_junction_targets)