SSH to sandbox with YAML

YAML parameters for SSH to sandbox

NameTypeDescription
action RequiredStringThe ID of the action.
type RequiredStringThe type of the action. Must be set to SANDBOX_EXEC.
working_directoryStringThe absolute or relative path on the sandbox.
userStringThe name of the local (to the sandbox server) user who uploads the files.
commands RequiredString[]The array of commands invoked on the sandbox.
shellStringThe name of the shell used to execute commands. Can be one of BASH (default) or SH.
sandbox_references RequiredStringDefines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_idStringID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referenced_action_idIntID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referenced_sanbox_nameStringName of the target sandbox. Required when sandbox_references is set to BY_NAME.
tagsString[]List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandbox_project_nameStringName of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
daysIntNumber of days passed since the creation of the target sandbox. One of 1, 2, 3, 7, 14, 30. Required when sandbox_references is set to BY_DAYS.
execute_every_commandBooleanIf set to true all commands will be executed regardless of the result of the previous command.

YAML example for SSH to sandbox

yaml
actions: - action: "Execute commands in sandbox" type: "SANDBOX_EXEC" working_directory: "/root" user: "ubuntu" commands: - "ls" shell: "BASH" sandbox_references: - "BY_ID" sandbox_id: "Cgn3QO34klUri" execute_every_command: true

Last modified on Sep 23, 2024