diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-07-07 22:19:08 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-07-09 16:10:05 +0900 |
commit | 66fa3a11db6faff0620f3dc62c8d05c9f71f8734 (patch) | |
tree | c0b8a1d50993a9853ab2531b30ba14b3d8a322b2 | |
parent | f35278a1d0ce009f2d03475765388fad00c8e4f0 (diff) | |
download | buildstream-66fa3a11db6faff0620f3dc62c8d05c9f71f8734.tar.gz |
context.py & userconfig.yaml: New syntax for remote artifact caches
-rw-r--r-- | buildstream/context.py | 15 | ||||
-rw-r--r-- | buildstream/data/userconfig.yaml | 11 |
2 files changed, 20 insertions, 6 deletions
diff --git a/buildstream/context.py b/buildstream/context.py index 0ad894d96..e13572b2f 100644 --- a/buildstream/context.py +++ b/buildstream/context.py @@ -68,8 +68,11 @@ class Context(): self.artifactdir = None """The local binary artifact cache directory""" - self.artifact_share = None - """The artifact cache share URL""" + self.artifact_pull = None + """The URL from which to download prebuilt artifacts""" + + self.artifact_push = None + """The URL to upload built artifacts to""" self.logdir = None """The directory to store build logs""" @@ -153,10 +156,10 @@ class Context(): path = os.path.expandvars(path) setattr(self, dir, path) - try: - self.artifact_share = _yaml.node_get(defaults, str, 'artifact-share') - except: - self.artifact_share = None + # Load artifact share configuration + artifacts = _yaml.node_get(defaults, Mapping, 'artifacts') + self.artifact_pull = _yaml.node_get(artifacts, str, 'pull-url', '') or None + self.artifact_push = _yaml.node_get(artifacts, str, 'push-url', '') or None # Load logging config logging = _yaml.node_get(defaults, Mapping, 'logging') diff --git a/buildstream/data/userconfig.yaml b/buildstream/data/userconfig.yaml index 84771d895..a3e94217b 100644 --- a/buildstream/data/userconfig.yaml +++ b/buildstream/data/userconfig.yaml @@ -46,6 +46,17 @@ scheduler: on-error: quit # +# Artifacts +# +artifacts: + + # A url from which to download prebuilt artifacts + pull-url: '' + + # A url to upload built artifacts to + push-url: '' + +# # Logging # logging: |