diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-11-16 17:33:49 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-11-22 15:03:55 +0000 |
commit | bf8fc373d7711861129ab841a74ecf32b3d8b2dd (patch) | |
tree | dd1b8c94a73b61f34ffcfbb8942cbb763a7bf210 /buildstream/_pipeline.py | |
parent | 43d3871533a41524f3537793a2a1ea1a7a3e1aed (diff) | |
download | buildstream-sam/canonical-push-urls.tar.gz |
Replace 'push-url' and 'pull-url' options with just 'url'sam/canonical-push-urls
This is possible now that the SSH protocol can redirect to the
appropriate pull URL.
Note that this commit makes no attempt at backwards compatibility.
Everthing will break!
Diffstat (limited to 'buildstream/_pipeline.py')
-rw-r--r-- | buildstream/_pipeline.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index 75e5b0a50..8245b31ca 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -174,7 +174,7 @@ class Pipeline(): if fetch_remote_refs and self.artifacts.can_fetch(): try: if remote_ticker: - remote_ticker(self.artifacts.artifact_pull) + remote_ticker(self.artifacts.url) self.artifacts.fetch_remote_refs() except ArtifactError: self.message(MessageType.WARN, "Failed to fetch remote refs") @@ -284,24 +284,6 @@ class Pipeline(): return element - # Internal: If a remote artifact cache is configured for pushing, check - # that it actually works. Returns True if it works, False otherwise. - def can_push_remote_artifact_cache(self): - if self.artifacts.can_push(): - starttime = datetime.datetime.now() - self.message(MessageType.START, "Checking connectivity to remote artifact cache") - try: - self.artifacts.preflight() - except ArtifactError as e: - self.message(MessageType.WARN, str(e), - elapsed=datetime.datetime.now() - starttime) - return False - self.message(MessageType.SUCCESS, "Connectivity OK", - elapsed=datetime.datetime.now() - starttime) - return True - else: - return False - ############################################################# # Commands # ############################################################# @@ -433,7 +415,7 @@ class Pipeline(): queues.append(pull) queues.append(fetch) queues.append(build) - if self.can_push_remote_artifact_cache(): + if self.artifacts.can_push(): push = PushQueue() queues.append(push) queues[0].enqueue(plan) @@ -683,8 +665,6 @@ 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 cache") plan = elements self.assert_consistent(plan) |