Class: Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Command

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/remotebuildexecution_v2/classes.rb,
lib/google/apis/remotebuildexecution_v2/representations.rb,
lib/google/apis/remotebuildexecution_v2/representations.rb

Overview

A Command is the actual command executed by a worker running an Action and specifications of its environment. Except as otherwise required, the environment (such as which system libraries or binaries are available, and what filesystems are mounted where) is defined by and specific to the implementation of the remote execution API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BuildBazelRemoteExecutionV2Command

Returns a new instance of BuildBazelRemoteExecutionV2Command.



784
785
786
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 784

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#argumentsArray<String>

The arguments to the command. The first argument must be the path to the executable, which must be either a relative path, in which case it is evaluated with respect to the input root, or an absolute path. Corresponds to the JSON property arguments

Returns:

  • (Array<String>)


680
681
682
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 680

def arguments
  @arguments
end

#environment_variablesArray<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2CommandEnvironmentVariable>

The environment variables to set when running the program. The worker may provide its own default environment variables; these defaults can be overridden using this field. Additional variables can also be specified. In order to ensure that equivalent Commands always hash to the same value, the environment variables MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. Corresponds to the JSON property environmentVariables



690
691
692
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 690

def environment_variables
  @environment_variables
end

#output_directoriesArray<String>

A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in output_files. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (/) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use output_paths instead. Corresponds to the JSON property outputDirectories

Returns:

  • (Array<String>)


713
714
715
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 713

def output_directories
  @output_directories
end

#output_filesArray<String>

A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in output_directories, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (/) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use output_paths instead. Corresponds to the JSON property outputFiles

Returns:

  • (Array<String>)


732
733
734
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 732

def output_files
  @output_files
end

#output_node_propertiesArray<String>

A list of keys for node properties the client expects to retrieve for output files and directories. Keys are either names of string-based NodeProperty or names of fields in NodeProperties. In order to ensure that equivalent Action s always hash to the same value, the node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of string-based properties is server-dependent. If a property is not recognized by the server, the server will return an INVALID_ARGUMENT. Corresponds to the JSON property outputNodeProperties

Returns:

  • (Array<String>)


744
745
746
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 744

def output_node_properties
  @output_node_properties
end

#output_pathsArray<String>

A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (/ ) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED output_files and output_directories fields. If output_paths is used, output_files and output_directories will be ignored! Corresponds to the JSON property outputPaths

Returns:

  • (Array<String>)


767
768
769
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 767

def output_paths
  @output_paths
end

#platformGoogle::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Platform

A Platform is a set of requirements, such as hardware, operating system, or compiler toolchain, for an Action's execution environment. A Platform is represented as a series of key-value pairs representing the properties that are required of the platform. Corresponds to the JSON property platform



775
776
777
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 775

def platform
  @platform
end

#working_directoryString

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. Corresponds to the JSON property workingDirectory

Returns:

  • (String)


782
783
784
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 782

def working_directory
  @working_directory
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



789
790
791
792
793
794
795
796
797
798
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 789

def update!(**args)
  @arguments = args[:arguments] if args.key?(:arguments)
  @environment_variables = args[:environment_variables] if args.key?(:environment_variables)
  @output_directories = args[:output_directories] if args.key?(:output_directories)
  @output_files = args[:output_files] if args.key?(:output_files)
  @output_node_properties = args[:output_node_properties] if args.key?(:output_node_properties)
  @output_paths = args[:output_paths] if args.key?(:output_paths)
  @platform = args[:platform] if args.key?(:platform)
  @working_directory = args[:working_directory] if args.key?(:working_directory)
end