summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend/cli.py
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.co.uk>2019-08-29 10:54:18 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-09-05 07:56:42 +0000
commit5529b914a2531f56a1bd694f66797341b488ab16 (patch)
tree86d20be945a86b7d352a83b0321b9e959c579d7b /src/buildstream/_frontend/cli.py
parentd3cb30cecdccbdb65fea9d20989a57b461cfdeaf (diff)
downloadbuildstream-5529b914a2531f56a1bd694f66797341b488ab16.tar.gz
cli.py: Allow push to handle artifact refs
This patch extends support for bst artifact push so that is now able to handle artifact refs. If --deps all is selected and a ref is given, BuildStream will error.
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 e5325934c..c492254ce 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -1180,10 +1180,10 @@ def artifact_pull(app, elements, deps, remote):
help='The dependencies to push')
@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_push(app, elements, deps, remote):
+def artifact_push(app, artifacts, deps, remote):
"""Push a built artifact to a remote artifact cache.
Specifying no elements will result in pushing the default targets
@@ -1209,12 +1209,12 @@ def artifact_push(app, elements, deps, remote):
with app.initialized(session_name="Push"):
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 pushed, exclude them from default targets
ignore_junction_targets = True
- app.stream.push(elements, selection=deps, remote=remote,
+ app.stream.push(artifacts, selection=deps, remote=remote,
ignore_junction_targets=ignore_junction_targets)