aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Hunt <lexer@google.com>2018-06-07 11:09:42 -0400
committerOla Rozenfeld <olaola@google.com>2018-06-20 13:47:53 -0400
commited2109f8b760773be77bcda07a912a6461b578aa (patch)
tree1b1f035e546766f1315f0ec01f899cb381ef5b6a
parenta98914d5c081c3292f0a8a7bc5aaada0b06ef1ab (diff)
downloadbazelbuild-remote-apis-ed2109f8b760773be77bcda07a912a6461b578aa.tar.gz
Add a working directory to the Action message.
This allows a job to be started from a directory other than the input root. While Bazel does not need this functionality, it is not uncommon for other build systems to descend into subdirectories to run their actions, and forcing them to either re-architect so that they run from input root or include a wrapper script is not optimal, especially given that such wrappers are platform-dependent and, on platforms with high process startup latency, may cost performance.
-rw-r--r--build/bazel/remote/execution/v2/remote_execution.proto5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/bazel/remote/execution/v2/remote_execution.proto b/build/bazel/remote/execution/v2/remote_execution.proto
index 153857b..7843200 100644
--- a/build/bazel/remote/execution/v2/remote_execution.proto
+++ b/build/bazel/remote/execution/v2/remote_execution.proto
@@ -426,6 +426,11 @@ message Command {
// value, the environment variables MUST be lexicographically sorted by name.
// Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
repeated EnvironmentVariable environment_variables = 2;
+
+ // The working directory, relative to the input root, for the command to run
+ // in. It must be a directory which exists in the input tree. If it is left
+ // empty, then the action is run in the input root.
+ string working_directory = 6;
}
// A `Platform` is a set of requirements, such as hardware, operating system, or