diff options
-rw-r--r-- | buildstream/_project.py | 8 | ||||
-rw-r--r-- | buildstream/data/projectconfig.yaml | 3 | ||||
-rw-r--r-- | buildstream/element.py | 6 |
3 files changed, 16 insertions, 1 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py index 2f8ae69fb..f0ca3d71b 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -128,6 +128,7 @@ class Project(): self._shell_host_files = [] # A list of HostMount objects self.artifact_cache_specs = None + self.remote_execution_url = None self._sandbox = None self._splits = None @@ -471,7 +472,7 @@ class Project(): 'aliases', 'name', 'artifacts', 'options', 'fail-on-overlap', 'shell', 'fatal-warnings', - 'ref-storage', 'sandbox', 'mirrors' + 'ref-storage', 'sandbox', 'mirrors', 'remote-execution' ]) # @@ -482,6 +483,11 @@ class Project(): # Load artifacts pull/push configuration for this project self.artifact_cache_specs = ArtifactCache.specs_from_config_node(config, self.directory) + # Load remote-execution configuration for this project + remote_execution = _yaml.node_get(config, Mapping, 'remote-execution') + _yaml.node_validate(remote_execution, ['url']) + self.remote_execution_url = _yaml.node_get(remote_execution, str, 'url') + # Load sandbox environment variables self.base_environment = _yaml.node_get(config, Mapping, 'environment') self.base_env_nocache = _yaml.node_get(config, list, 'environment-nocache') diff --git a/buildstream/data/projectconfig.yaml b/buildstream/data/projectconfig.yaml index c1ad2d147..1da67a530 100644 --- a/buildstream/data/projectconfig.yaml +++ b/buildstream/data/projectconfig.yaml @@ -204,3 +204,6 @@ shell: # Command to run when `bst shell` does not provide a command # command: [ 'sh', '-i' ] + +remote-execution: + url: ""
\ No newline at end of file diff --git a/buildstream/element.py b/buildstream/element.py index ae8e10144..9bdfaaabf 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -250,6 +250,12 @@ class Element(Plugin): # Extract Sandbox config self.__sandbox_config = self.__extract_sandbox_config(meta) + # Extract remote execution URL + if not self.__is_junction: + self.__remote_execution_url = project.remote_execution_url + else: + self.__remote_execution_url = None + def __lt__(self, other): return self.name < other.name |