Quick Info
What’s New?
Allows overriding of temporary directory used for running scripts.Description
A shell is a software that provides an interface for users of an operating system that provides access to the services of a kernel. Operating system shells typically fall into 1 of 2 categories: command line and graphical. Command-line shells provide a command-line interface (CLI) to the operating system, while graphical shells provide a graphical user interface (GUI). In either category, the primary purpose of the shell is to call or start another program. Shells frequently have more capabilities such as viewing the contents of directories.With the Shell plug-in, you can run custom shell scripts during the deployment process.
Quick Info
launch-shell-20.1160845.zip
Uploaded: 31-Aug-2023 21:30
launch-shell-19.1158728.zip
Uploaded: 18-Jul-2023 13:33
Release Notes
Allows overriding of temporary directory used for running scripts.launch-shell-18.1158127.zip
Uploaded: 30-Jun-2023 06:50
Release Notes
Revert "Fixes APAR PH27500 - Shell step will now use AGENT_HOME/var/temp as the temporary directory." Shell step now uses system temp directory.launch-shell-17.1157671.zip
Uploaded: 24-May-2023 16:56
Release Notes
Port plug-in to Javalaunch-shell-16.1155715.zip
Uploaded: 21-Apr-2023 14:11
Release Notes
Updated Jettison library to 1.5.4 for CVE-2023-1436launch-shell-15.1150657.zip
Uploaded: 01-Feb-2023 14:30
Release Notes
Updated Jettison library for CVE-2022-45693 and CVE-2022-45685launch-shell-14.1148560.zip
Uploaded: 03-Jan-2023 15:40
Release Notes
Fixes APAR PH27500 - Shell step will now use AGENT_HOME/var/temp as the temporary directory.launch-shell-13.1142526.zip
Uploaded: 10-Oct-2022 16:34
Release Notes
Updated Jettison library for CVE-2022-40150 CVE-2022-40149launch-shell-12.1131568.zip
Uploaded: 08-Apr-2022 15:34
Release Notes
Update log4j 2.17launch-shell-11.1128757.zip
Uploaded: 07-Feb-2022 16:49
Release Notes
Remove log4j functionality related to: CVE-2019-17571, CVE-2020-9488. CVE-2021-4104, CVE-2022-23302, CVE-2022-23305, CVE-2022-23307launch-shell-10.1126864.zip
Uploaded: 23-Dec-2021 06:15
Release Notes
Add compatibility with Groovy 3launch-shell-10.1126079.zip
Uploaded: 02-Dec-2021 06:04
launch-shell-9.1108232.zip
Uploaded: 11-Jun-2021 11:21
Release Notes
Supports property file encryption.Summary
The Shell plug-in includes steps that run commands on the target system. You can run a command with or without arguments.
This plug-in includes one or more steps, click Steps for step details and properties.
Compatibility
This plug-in requires HCL Launch version 6.1.0.2 or later.
The steps in this plug-in run on any agents that the HCL Launch server supports.
Installation
See Installing plugins in HCL Launch for installing and removing plugins.
History
The following table describes the changes made in each plug-in version.
Version | Description |
---|---|
19 | Allows overriding of temporary directory used for running scripts. |
18 | Shell step will now use AGENT_HOME/var/temp as the temporary directory.” Shell step now uses system temp directory. |
17 | Port plug-in to Java. |
16 | Updated Jettison library to 1.5.4 for CVE-2023-1436. |
15 | Updated Jettison library for CVE-2022-45693 and CVE-2022-45685. |
14 | Fixes APAR PH27500 – Shell step will now use AGENT_HOME/var/temp as the temporary directory. |
13 | Updated Jettison library for CVE-2022-40150 CVE-2022-40149. |
12 | Updated log4j 2.17. |
11 | Removed log4j functionality related to: CVE-2019-17571, CVE-2020-9488. CVE-2021-4104, CVE-2022-23302, CVE-2022-23305, CVE-2022-23307. |
10 | Added compatibility with Groovy 3. |
9 | Support property file encryption. |
8 | Added support for encrypted property files. |
7 | Includes a fix for APAR PI40728. The Shell (with xargs) step now correctly displays the arguments in the logs. |
6 | Includes a fix for APAR PI35342. The plug-in is now compatible with HCL Launch version 6.1.0.4 and later. |
5 | Includes a fix for a defect where the Shell plug-in was not upgraded when users upgraded to HCL Launch version 6.1.0.2 and later. |
Usage
With the Shell plug-in steps, you can run a Shell script as part of the deployment process. The plug-in step contains the scripts.
The steps in this plug-in wait until the command is complete. For best results, run commands that complete or run the commands in the background. If a command runs indefinitely, the step and the process that contains the step wait indefinitely.
The commands for each step share stdout and stdin streams. If you use a command or script that runs other commands, each of those commands uses the same stdout and stdin stream as the first command or script. The step waits for all commands to finish.
Each step runs in its own shell. For example, if you set a system variable in one step, future steps do not have access to the variable because they are running in a new instance of the shell.
If one shell script calls another shell script, starting a child process, this child process inherits the file descriptors of the parent process, such as input and output streams. If the parent shell script exits but the child process does not, the step continues, waiting for output from the child process. To make sure that the step can end normally, redirect the output and error streams for the child process. For example, if the child process is child.sh
, you can redirect the output and error streams with the following code:
child.sh < /dev/null > tempout 2>&1
cat tempout
Step palette
To access this plug-in in the palette, click Scripting > Shell.
Steps
The following process steps are available in the Shell plug-in.
Shell
Use this step to run a shell or batch script.
Name | Type | Description | Required |
---|---|---|---|
Daemon | Boolean | If this property is enabled, the command runs in the background while it permits the step to complete immediately. The output is not captured if the command runs as a daemon. | No |
Directory Offset | String | The working directory to use when you execute this command. This directory is relative to the current working directory. | Yes |
Interpreter | String | The interpreter to use to evaluate the command. If this property is left blank the following platform-specific interpreters are used: Windows:.bat file interpreterVMS: .com file interpreterOther: The shell that is specified by the air/shell agent variable if it is present. Linux and UNIX systems might override this setting by having the command line start with a #! sequence. |
No |
Output File | String | Specify this property only if the Daemon property is enabled. The path of the file to which the command output is directed. To discard the output, leave this property blank. The output is captured if an output file is specified. | No |
Shell Script | String | The script code to execute. | Yes |
Shell (with xargs)
Use this step to run a shell or batch script a number of times equal to a multi-valued input.
</tr
Name | Type | Description | Required |
---|---|---|---|
Daemon | Boolean | If this property is enabled, the command runs in the background while permitting the step to complete immediately. The output is not captured if it runs as a daemon. | No |
Directory Offset | String | The working directory to use when you execute this command. This directory is relative to the current working directory. | Yes |
Interpreter | String | The interpreter to use to evaluate the command. If this property is left blank the following platform-specific interpreters are used: Windows: .bat file interpreterVMS: .com file interpreterOther: The shell that is specified by the air/shell agent variable if it is present. Linux and UNIX systems might override this setting by having the command line start with a #! sequence. |
No |
Once Per Arg | Boolean | Run the script once for each argument in the xargs property. | No |
Output File | String | The path of the file to which the command output is directed. To discard the output, leave this property blank. The output is captured if an output file is specified. | No |
Shell Script | String | The shell script code to execute. | Yes |
xargs | String | The list input value to the script. Separate each value with the delimiter that is specified in the delimiter property. | Yes |
xargs delimiter | String | The delimiter that is used to separate the input values to the script. The default delimiter used is the comma (,). | Yes |