Remote Script plugin and tasks
Remote Script tasks enable Release to execute commands on remote hosts using the Overthere framework, a Java library for manipulating files and executing processes on remote hosts.
You can use Remote Script tasks to:
- Execute shell scripts on Unix, z/OS, or Microsoft Windows (using Cygwin or WinSSHD) hosts.
- Execute batch scripts on Microsoft Windows hosts. Note: All scripts will be interpreted as batch files. PowerShell is currently not supported.
The following Remote Script task types are available:
- Remote Script: Unix: Execute a shell script on a Unix host using SSH
- Remote Script: Windows: Execute a batch script on a Microsoft Windows host using WinRM
- Remote Script: Windows (SSH): Execute a shell script on a Microsoft Windows host using SFTP
- Remote Script: z/OS: Execute a shell script on z/OS
In the release flow editor, Remote Script tasks are marked with a blue border.
The following properties are common to all Remote Script task types.
|Script||The shell script to execute on the remote host (required)|
|Remote Path||The path on the remote host where the script should be executed (required)|
|Temporary Directory Path||Where to store temporary files. This directory will be removed on connection close.|
|Jumpstation||The SSH jumpstation or HTTP proxy to use|
|Address and Port||Address and SSH port (or Telnet or WinRM port for Windows) of the remote host (required)|
|Connection type||The SSH connection type to use:
The following output properties are available:
|Output||The variable in which the standard output will be stored|
|Err||The variable in which the error output will be stored|
Note: The output of the remote script task is in Markdown format. See Using Markdown in Release for more information.
The following properties are available in the Remote Script: Unix, Remote Script: Windows (SSH), and Remote Script: z/OS task types.
|Username||The Unix host user login ID (required)|
|Password||The Unix host user password|
|Private key||The private key to use (verbatim) for authentication|
|Private key file and Passphrase||The file containing a private key, and an optional passphrase for the key it contains|
You can use a password, a private key, or a private key file and passphrase.
|SUDO username||Access files and commands after
|SU username and SU password||Access files and commands after
The following properties are available in the Remote Script: Windows task type.
|Username and Password||The Windows host user login ID and password|
|Allow credential delegation||If checked, allow the user’s credentials to be used to access. Example: remote shares (only on WINRM_NATIVE connection type).|
|CIFS Port||The port on which the CIFS (SMB) server runs|
|Windows path to Windows share mappings||Mapping from Windows paths to Windows share names. Example:
|Timeout||The WinRM timeout in XML schema duration format. The default value is
|Enable HTTPS for WinRM||Check this if the remote Windows host supports encrypted connections|
Release uses the Overthere framework, which includes several connection options. While most common options are available in the Release GUI, you can use other options as described in the Overthere documentation.
You can change the default values of options that are not exposed in the GUI in the
To use a different setting for a particular option per task, you can create a type modification in the
XL_RELEASE_SERVER_HOME/conf/synthetic.xml file for the task types. In the modification, you can add the desired Overthere connection option as a property on the task. These task properties will automatically be used as connection options for Overthere if the name matches.
Example: To make the connection timeout configurable on each task, add this to
<type-modification type="remoteScript.WindowsSsh"> <property name="connectionTimeoutMillis" category="input" kind="integer" default="120000" description="Number of milliseconds Overthere waits for a connection to a remote host to be established"/> </type-modification>
- Added compatibility with Release 9.5.0