summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-09-20 17:22:01 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-09-20 17:23:00 +0100
commit0cf6c6bcd8e69554872b05efb267f5530a6b86d4 (patch)
tree1eeb712168b91cdaca455c5b85201c06ea5fbf08
parent0a4f05f6a0486d6a58a83d50e9b607ddb747befe (diff)
downloadbuildstream-sam/push-check-connectivity.tar.gz
bst push: Check connectivity to cache before trying to pushsam/push-check-connectivity
On slow machines, the actual push operation can spend several minutes preparing before actually pushing, which is annoying if the push then fails.
-rw-r--r--buildstream/_pipeline.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index ba85c1147..03646ff81 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -686,6 +686,8 @@ class Pipeline():
if not self.artifacts.can_push():
raise PipelineError("Not configured for pushing artifacts")
+ if not self.can_push_remote_artifact_cache():
+ raise PipelineError("Unable to push to the configured remote artifact cache")
plan = elements
self.assert_consistent(plan)