summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common/api_bundle.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-01 14:56:32 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-04 16:05:08 +0200
commit9ab21a7f3d7e349b05ceaad5862d7e72a6d7e7b4 (patch)
tree269b95c86875d9bd4fe16e117aa9ba75b6c60304 /src/buildtool/execution_api/common/api_bundle.cpp
parent0cbc8e226b39ec731373b80024e23cc0580c27ac (diff)
downloadjustbuild-9ab21a7f3d7e349b05ceaad5862d7e72a6d7e7b4.tar.gz
Pass Auth::TLS instance to BazelApi and ServeApi
Diffstat (limited to 'src/buildtool/execution_api/common/api_bundle.cpp')
-rw-r--r--src/buildtool/execution_api/common/api_bundle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp
index 488fc25d..17e3d3af 100644
--- a/src/buildtool/execution_api/common/api_bundle.cpp
+++ b/src/buildtool/execution_api/common/api_bundle.cpp
@@ -19,8 +19,10 @@
#include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp"
ApiBundle::ApiBundle(RepositoryConfig const* repo_config,
+ Auth::TLS const* authentication,
std::optional<ServerAddress> const& remote_address)
- : local{std::make_shared<LocalApi>(repo_config)},
+ : local{std::make_shared<LocalApi>(repo_config)}, // needed by remote
+ auth{authentication}, // needed by remote
remote{CreateRemote(remote_address)} {}
auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const
@@ -29,7 +31,7 @@ auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const
ExecutionConfiguration config;
config.skip_cache_lookup = false;
return std::make_shared<BazelApi>(
- "remote-execution", address->host, address->port, config);
+ "remote-execution", address->host, address->port, auth, config);
}
return local;
}